Video
extends Image
in package
Image Class
Table of Contents
- $album : mixed
- $albumlink : mixed
- $albumname : mixed
- $albumnamealbum : mixed
- $comments : mixed
- $displayname : mixed
- $exists : mixed
- $filemtime : mixed
- $filename : mixed
- $imagefolder : mixed
- $loaded : mixed
- $localpath : mixed
- $manage_rights : mixed
- $manage_some_rights : mixed
- $objectsThumb : mixed
- $sidecars : mixed
- $table : mixed
- $thumbdimensions : mixed
- $transient : mixed
- $videoalt : mixed
- $view_rights : mixed
- $webpath : mixed
- $id : mixed
- $index : mixed
- $is_public : mixed
- $sortorder : mixed
- $cache_by : mixed
- $commentcount : mixed
- $data : mixed
- $tempdata : mixed
- $unique_set : mixed
- $updates : mixed
- $use_cache : mixed
- __construct() : Image
- Constructor for class-video
- __toString() : string
- "Magic" function to return a string identifying the object when it is treated as a string
- addComment() : object
- Adds comments to the album assumes data is coming straight from GET or POST
- checkAccess() : mixed
- Checks if viewing of object is allowed
- checkChanges() : bool
- By default the object is saved if there are any updates within the property `$updates` no matter if these are actual changes to existing data.
- checkforGuest() : mixed
- Checks if guest is loggedin for the album
- checkForGuest() : mixed
- returns false (deny) if gallery is "private"
- checkPublishDates() : bool
- Checks if the item is either expired or needs to be scheduled published A class method wrapper of the functions.php function of the same name
- checkScheduledPublishing() : int
- Checks if the item has expired or is in scheduled publishing
- clearCache() : mixed
- Clears the object cache by setting it to an empty array completely or a specific object (class name) cache.
- clearObjectCache() : mixed
- Shortcut to clear the cache of the current object class only
- copy() : mixed
- Copy this record to another unique set. Checks if the record exists there first, if so returns false. If successful returns true. No changes are made to this object and no other objects are created, just the database entry.
- countHit() : mixed
- counts visits to the object
- get() : mixed
- Get the value of a variable. If $current is false, return the value as of the last save of this object.
- getAlbum() : object
- Returns the album that holds this image
- getAlbumName() : string
- Retuns the folder name of the album that holds this image
- getCity() : string
- Returns the city field of the image
- getCodeblock() : array<string|int, mixed>
- Returns the codeblocks as an serialized array
- getCommentCount() : int
- Returns the count of comments in the album. Ignores comments in moderation
- getComments() : array<string|int, mixed>
- Returns an array of comments for this album
- getCommentsAllowed() : bool
- Retuns true if comments are allowed
- getContent() : string
- returns the content of the vido
- getCopyright() : string
- Returns the copyright field of the image
- getCopyrightNotice() : string|null
- Returns the content of the copyright field if set.
- getCopyrightRightsholder() : mixed
- Gets the general option "copyright_image_rightsholder" respectively "copyright_image_rightsholder_custom" If set to "none" the following fallbacks are tried.
- getCopyrightURL() : string
- Gets the image copyright URL
- getCountry() : string
- Returns the country field of the image
- getCredit() : string
- Returns the credit field of the image
- getCustomData() : string
- returns the custom data field
- getCustomImage() : string
- Get a custom sized version of this image based on the parameters.
- getData() : array<string|int, mixed>
- returns the database record of the object
- getDateTime() : int
- Returns the unformatted date
- getDesc() : string
- Returns the description
- getExpireDate() : string
- Returns the expire date
- getFileName() : string
- Returns the image filename
- getFilesize() : int|false
- Returns the filesize in bytes of the full image
- getFullImage() : string
- Returns a path to the original image in the original folder.
- getFullImageURL() : mixed
- returns URL to the original image or to a high quality alternate e.g. ogg, avi, wmv files that can be handled by the client browser
- getGeodata() : array<string|int, mixed>
- If there is valid GPS data returns key value array with "long" and "lat" keys otherwise an empty array
- getHeight() : int
- Returns the height of the image
- getHitcounter() : int
- Returns the hitcount
- getID() : string
- Returns the id
- getImageFootprint() : string
- Returns the disk size of the image
- getIndex() : int
- Get the index of this image in the album, taking sorting into account.
- getLastChange() : string
- Returns the last change user
- getLastChangeUser() : string
- Returns the last change user
- getLink() : string
- Returns a path urlencoded image page link for the image
- getLocation() : string
- Returns the location field of the image
- getMetaData() : array<string|int, mixed>
- Returns an array of EXIF data
- getName() : string
- Returns the image filename
- getNextImage() : object
- Returns the next Image.
- getOrientation() : bool|string
- Returns 'is_square', 'is_landscape', 'is_portrait' if the original image's widht and height match.
- getOwner() : string
- Gets the owner of the image
- getParentID() : string
- Returns the partent id
- getPassword() : string
- Returns the password
- getPasswordHint() : string
- Returns the password hint
- getPrevImage() : object
- Return the previous Image
- getPublishDate() : string
- Returns the publish date
- getShow() : bool
- Returns true published
- getSizedImage() : string
- (non-PHPdoc)
- getSortOrder() : string
- Returns the sort order
- getState() : string
- Returns the state field of the image
- getTags() : string
- Returns the tag data
- getThumb() : string
- Get a default-sized thumbnail of this image.
- getThumbCropping() : mixed
- Returns an array of cropping parameters. Used as a "helper" function for various inherited getThumb() methods
- getThumbDimensions() : array<string|int, mixed>
- Returns an array with widht and height the sidecar thumb image
- getThumbHeight() : int
- Returns the height of the image. Here just the same as getHeight().
- getThumbImageFile() : string
- Returns the image file name for the thumbnail image.
- getThumbWidth() : int
- Returns the width of the thumb. Here just the same as getWidth().
- getTitle() : string
- Returns the title
- getUser() : string
- Returns the guest user
- getWatermark() : string
- Returns the custom watermark name
- getWidth() : int
- Returns the width of the image
- getWMUse() : bool
- Returns the custom watermark usage
- hasExpiration() : bool
- Returns true if the item will be automatically unpublished by a not yet reached future expire date
- hasExpired() : bool
- Returns true if the items has been unpublished after reaching the set expire date.
- hasExpireDate() : bool
- Returns true if the item has a proper expire date set no matter if it has expired already or will expire in the future
- hasFutureDate() : string
- Returns the future date (publishdate for gallery, date for Zenpage items) if set to the future only
- hasInactiveExpiration() : bool
- Returns true if a future expiredate is set but the item is unpublished
- hasInactivePublishSchedule() : bool
- Returns true if the item has a future date but is not published
- hasPublishSchedule() : bool
- Returns true if the item will be automatically published by a future date set
- hasTag() : bool
- Checks if an object has a tag assigned.
- instantiate() : bool
- }
- isImageClass() : bool
- Returns true if the object is a zenphoto 'image'
- isLandscape() : bool
- Returns true if the image has landscape orientation
- isMyItem() : mixed
- Checks basic access rights of an object
- isPhoto() : bool
- Returns true if the image is a "photo"
- isPortrait() : bool
- Returns true if the image has portrait orientation
- isProtected() : mixed
- returns true if there is any protection on the image
- isPublic() : bool
- Returns true if this image is published and also its album and all of its parents.
- isPublished() : bool
- Returns true if the item itself is published
- isSquare() : bool
- Returns true if the image is a square
- isVideo() : bool
- Returns true if the image is an "video" file
- move() : mixed
- Change one or more values of the unique set assigned to this record.
- newImage() : object
- Returns a new "image" object based on the file extension
- remove() : bool
- Deletes object from the database
- rename() : bool
- Renames an image to a new filename, keeping it in the same album. Convenience for move($image->album, $newfilename).
- save() : mixed
- Save the updates made to this object since the last update. Returns true if successful, false if not.
- set() : mixed
- Set a variable in this object. Does not persist to the database until save() is called. So, IMPORTANT: Call save() after set() to persist.
- setCity() : mixed
- Stores the city field of the image
- setCodeblock() : mixed
- set the codeblocks as an serialized array
- setCommentsAllowed() : mixed
- Sets the comments allowed flag
- setCopyright() : mixed
- Stores the text for the copyright field of the image
- setCountry() : mixed
- Stores the country field of the image
- setCredit() : mixed
- Stores the credit field of the image
- setCustomData() : mixed
- Sets the custom data field
- setDateTime() : mixed
- Stores the date
- setDesc() : mixed
- Stores the description
- setExpireDate() : mixed
- sets the expire date
- setLastChange() : mixed
- stores the current date in the format 'Y-m-d H:i:s' as the last change date
- setLastchangeUser() : mixed
- stores the last change user
- setLocation() : mixed
- Stores the location field of the image
- setOwner() : mixed
- setParentID() : mixed
- Sets the ParentID field
- setPassword() : mixed
- Sets the encrypted password
- setPasswordHint() : mixed
- Sets the password hint
- setPublishDate() : mixed
- sets the publish date
- setPublished() : mixed
- Stores the published value
- setShow() : mixed
- Stores the published value
- setSortOrder() : mixed
- Stores the sort order
- setState() : mixed
- Stores the state field of the image
- setTags() : mixed
- Stores tag information
- setTitle() : mixed
- Stores the title
- setUpdatedDateAlbum() : mixed
- Sets the current date to the images'album and all of its parent albums recursively
- setUser() : mixed
- Sets the guest user
- setWatermark() : mixed
- Set custom watermark
- setWMUse() : mixed
- Sets the custom watermark usage
- updateDimensions() : mixed
- Update this object's values for width and height.
- updateMetaData() : mixed
- Processes multi-media file metadata (non-PHPdoc)
- classSetup() : bool
- generic "image" class setup code Returns true if valid image.
- fileChanged() : bool
- Returns true if the file has changed since last time we looked
- setDefaults() : mixed
- Sets default values for new objects using the set() method.
- addToCache() : mixed
- add the entry to the cache
- getFromCache() : mixed
- check the cache for presence of the entry and return it if found
- getIPTCTag() : string
- Fetches a single tag from IPTC data
- getIPTCTagArray() : array<string|int, mixed>
- Fetches the IPTC array for a single tag.
- getMetaDataID3() : mixed
- "video" metadata support function
- load() : false
- Load the data array from the database, using the unique id set to get the unique record.
- prepIPTCString() : string
- Returns the IPTC data converted into UTF8
Properties
$album
public
mixed
$album
$albumlink
public
mixed
$albumlink
$albumname
public
mixed
$albumname
$albumnamealbum
public
mixed
$albumnamealbum
$comments
public
mixed
$comments
= \NULL
$displayname
public
mixed
$displayname
$exists
public
mixed
$exists
= \false
$filemtime
public
mixed
$filemtime
$filename
public
mixed
$filename
$imagefolder
public
mixed
$imagefolder
$loaded
public
mixed
$loaded
= \false
$localpath
public
mixed
$localpath
$manage_rights
public
mixed
$manage_rights
= \ADMIN_RIGHTS
$manage_some_rights
public
mixed
$manage_some_rights
= \ADMIN_RIGHTS
$objectsThumb
public
mixed
$objectsThumb
= \NULL
$sidecars
public
mixed
$sidecars
= array()
$table
public
mixed
$table
$thumbdimensions
public
mixed
$thumbdimensions
= \null
$transient
public
mixed
$transient
$videoalt
public
mixed
$videoalt
= array()
$view_rights
public
mixed
$view_rights
= \VIEW_ALL_RIGHTS
$webpath
public
mixed
$webpath
$id
protected
mixed
$id
= 0
$index
protected
mixed
$index
$is_public
protected
mixed
$is_public
= \null
$sortorder
protected
mixed
$sortorder
$cache_by
private
mixed
$cache_by
$commentcount
private
mixed
$commentcount
$data
private
mixed
$data
= \NULL
$tempdata
private
mixed
$tempdata
= \NULL
$unique_set
private
mixed
$unique_set
= \NULL
$updates
private
mixed
$updates
= \NULL
$use_cache
private
mixed
$use_cache
= \false
Methods
__construct()
Constructor for class-video
public
__construct(object $album, sting $filename[, mixed $quiet = false ]) : Image
Parameters
- $album : object
-
the owning album
- $filename : sting
-
the filename of the image
- $quiet : mixed = false
Return values
Image —__toString()
"Magic" function to return a string identifying the object when it is treated as a string
public
__toString() : string
Return values
string —addComment()
Adds comments to the album assumes data is coming straight from GET or POST
public
addComment(string $name, string $email, string $website, string $comment, string $code, string $code_ok, string $ip, bool $private, bool $anon, string $customdata, bool $dataconfirmation) : object
Returns a comment object
Parameters
- $name : string
-
Comment author name
- $email : string
-
Comment author email
- $website : string
-
Comment author website
- $comment : string
-
body of the comment
- $code : string
-
CAPTCHA code entered
- $code_ok : string
-
CAPTCHA hash expected
- $ip : string
-
the IP address of the comment poster
- $private : bool
-
set to true if the comment is for the admin only
- $anon : bool
-
set to true if the poster wishes to remain anonymous
- $customdata : string
- $dataconfirmation : bool
-
true or false if data privacy confirmation was required
Return values
object —checkAccess()
Checks if viewing of object is allowed
public
checkAccess([string &$hint = NULL ][, string &$show = NULL ]) : mixed
Parameters
- $hint : string = NULL
- $show : string = NULL
Return values
mixed —checkChanges()
By default the object is saved if there are any updates within the property `$updates` no matter if these are actual changes to existing data.
public
checkChanges([bool $update = true ]) : bool
This checks that and internally updates the $updates
property with the actual changes obky so you optionally can skip unnecessary object saves.
Standard object fields lastchange
and lastchangeuser
are exclude because lastchange
always changes and both make no sense
if there is no actual content change at all.
This can be used before calling the save() method or enabled within the save() method optionally
Parameters
- $update : bool = true
-
True (default) to also update the $updates property with changes found or clear it. False to only check for changes.
Tags
Return values
bool —checkforGuest()
Checks if guest is loggedin for the album
public
checkforGuest([unknown_type &$hint = NULL ][, unknown_type &$show = NULL ]) : mixed
Parameters
- $hint : unknown_type = NULL
- $show : unknown_type = NULL
Return values
mixed —checkForGuest()
returns false (deny) if gallery is "private"
public
checkForGuest([ &$hint = NULL ][, &$show = NULL ]) : mixed
Parameters
Return values
mixed —checkPublishDates()
Checks if the item is either expired or needs to be scheduled published A class method wrapper of the functions.php function of the same name
public
checkPublishDates() : bool
Return values
bool —checkScheduledPublishing()
Checks if the item has expired or is in scheduled publishing
public
static checkScheduledPublishing(array<string|int, mixed> $row) : int
Returns 1 if expired, 2 if in scheduled future publishing
Parameters
- $row : array<string|int, mixed>
-
database row of the object
Tags
Return values
int —clearCache()
Clears the object cache by setting it to an empty array completely or a specific object (class name) cache.
public
static clearCache([mixed $class = null ]) : mixed
Note: You normally never need to use this. But on certain occasions it may be necessary to avoid memory issues if you loop through a lot of object creations.
Parameters
- $class : mixed = null
Tags
Return values
mixed —clearObjectCache()
Shortcut to clear the cache of the current object class only
public
clearObjectCache() : mixed
Tags
Return values
mixed —copy()
Copy this record to another unique set. Checks if the record exists there first, if so returns false. If successful returns true. No changes are made to this object and no other objects are created, just the database entry.
public
copy(mixed $new_unique_set) : mixed
A call to copy is instant, it does not require a save() following it.
Parameters
- $new_unique_set : mixed
Return values
mixed —countHit()
counts visits to the object
public
countHit() : mixed
Return values
mixed —get()
Get the value of a variable. If $current is false, return the value as of the last save of this object.
public
get(mixed $var[, mixed $current = true ]) : mixed
Parameters
- $var : mixed
- $current : mixed = true
Return values
mixed —getAlbum()
Returns the album that holds this image
public
getAlbum() : object
Return values
object —getAlbumName()
Retuns the folder name of the album that holds this image
public
getAlbumName() : string
Return values
string —getCity()
Returns the city field of the image
public
getCity([mixed $locale = NULL ]) : string
Parameters
- $locale : mixed = NULL
Return values
string —getCodeblock()
Returns the codeblocks as an serialized array
public
getCodeblock() : array<string|int, mixed>
Return values
array<string|int, mixed> —getCommentCount()
Returns the count of comments in the album. Ignores comments in moderation
public
getCommentCount() : int
Return values
int —getComments()
Returns an array of comments for this album
public
getComments([bool $moderated = false ][, bool $private = false ][, bool $desc = false ]) : array<string|int, mixed>
Parameters
- $moderated : bool = false
-
if false, ignores comments marked for moderation
- $private : bool = false
-
if false ignores private comments
- $desc : bool = false
-
set to true for descending order
Return values
array<string|int, mixed> —getCommentsAllowed()
Retuns true if comments are allowed
public
getCommentsAllowed() : bool
Return values
bool —getContent()
returns the content of the vido
public
getContent([ $w = NULL ][, $h = NULL ]) : string
Parameters
Return values
string —getCopyright()
Returns the copyright field of the image
public
getCopyright([mixed $locale = NULL ]) : string
Parameters
- $locale : mixed = NULL
Return values
string —getCopyrightNotice()
Returns the content of the copyright field if set.
public
getCopyrightNotice([string $locale = null ]) : string|null
If not it tries the following fallbacks:
- IPTCCopyright field
- EXIFCopyright field
- "coypright_image_notice" option
- Owner
Parameters
- $locale : string = null
Tags
Return values
string|null —getCopyrightRightsholder()
Gets the general option "copyright_image_rightsholder" respectively "copyright_image_rightsholder_custom" If set to "none" the following fallbacks are tried.
public
getCopyrightRightsholder() : mixed
- EXIFArtist
- VideoArtist (for multimedia "images") – IPTCByLine
- the owner (fullname if available)
Tags
Return values
mixed —getCopyrightURL()
Gets the image copyright URL
public
getCopyrightURL() : string
Tags
Return values
string —getCountry()
Returns the country field of the image
public
getCountry([mixed $locale = NULL ]) : string
Parameters
- $locale : mixed = NULL
Return values
string —getCredit()
Returns the credit field of the image
public
getCredit([mixed $locale = NULL ]) : string
Parameters
- $locale : mixed = NULL
Return values
string —getCustomData()
returns the custom data field
public
getCustomData([mixed $locale = NULL ]) : string
Parameters
- $locale : mixed = NULL
Return values
string —getCustomImage()
Get a custom sized version of this image based on the parameters.
public
getCustomImage(int $size, int $width, int $height, int $cropw, int $croph, int $cropx, int $cropy[, bool $thumbStandin = false ][, bool $effects = NULL ]) : string
Parameters
- $size : int
-
size
- $width : int
-
width
- $height : int
-
height
- $cropw : int
-
crop width
- $croph : int
-
crop height
- $cropx : int
-
crop x axis
- $cropy : int
-
crop y axis
- $thumbStandin : bool = false
-
set to true to treat as thumbnail
- $effects : bool = NULL
-
ignored
Return values
string —getData()
returns the database record of the object
public
getData() : array<string|int, mixed>
Return values
array<string|int, mixed> —getDateTime()
Returns the unformatted date
public
getDateTime() : int
Return values
int —getDesc()
Returns the description
public
getDesc([mixed $locale = NULL ]) : string
Parameters
- $locale : mixed = NULL
Return values
string —getExpireDate()
Returns the expire date
public
getExpireDate() : string
Return values
string —getFileName()
Returns the image filename
public
getFileName() : string
Tags
Return values
string —getFilesize()
Returns the filesize in bytes of the full image
public
getFilesize() : int|false
Tags
Return values
int|false —getFullImage()
Returns a path to the original image in the original folder.
public
getFullImage([string $path = WEBPATH ]) : string
Parameters
- $path : string = WEBPATH
-
the "path" to the image. Defaults to the simple WEBPATH
Return values
string —getFullImageURL()
returns URL to the original image or to a high quality alternate e.g. ogg, avi, wmv files that can be handled by the client browser
public
getFullImageURL() : mixed
Return values
mixed —getGeodata()
If there is valid GPS data returns key value array with "long" and "lat" keys otherwise an empty array
public
getGeodata() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getHeight()
Returns the height of the image
public
getHeight() : int
Return values
int —getHitcounter()
Returns the hitcount
public
getHitcounter() : int
Return values
int —getID()
Returns the id
public
getID() : string
Return values
string —getImageFootprint()
Returns the disk size of the image
public
getImageFootprint() : string
Return values
string —getIndex()
Get the index of this image in the album, taking sorting into account.
public
getIndex([bool $use_realalbum = false ]) : int
Parameters
- $use_realalbum : bool = false
-
If the image is wihtin a dynamic album this is the index within it, set to true to get the index of the actual physical album the image belongs
Return values
int —getLastChange()
Returns the last change user
public
getLastChange() : string
Return values
string —getLastChangeUser()
Returns the last change user
public
getLastChangeUser() : string
Tags
Return values
string —getLink()
Returns a path urlencoded image page link for the image
public
getLink() : string
Return values
string —getLocation()
Returns the location field of the image
public
getLocation([mixed $locale = NULL ]) : string
Parameters
- $locale : mixed = NULL
Return values
string —getMetaData()
Returns an array of EXIF data
public
getMetaData() : array<string|int, mixed>
Return values
array<string|int, mixed> —getName()
Returns the image filename
public
getName() : string
Tags
Return values
string —getNextImage()
Returns the next Image.
public
getNextImage() : object
Return values
object —getOrientation()
Returns 'is_square', 'is_landscape', 'is_portrait' if the original image's widht and height match.
public
getOrientation([string $type = 'image' ]) : bool|string
Parameters
- $type : string = 'image'
-
'image' or 'thumb' - the latter may be different on non image "image items"
Tags
Return values
bool|string —getOwner()
Gets the owner of the image
public
getOwner([bool $fullname = false ]) : string
Parameters
- $fullname : bool = false
-
Set to true to get the full name (if the owner is a vaild user of the site and has the full name defined)
Return values
string —getParentID()
Returns the partent id
public
getParentID() : string
Return values
string —getPassword()
Returns the password
public
getPassword() : string
Return values
string —getPasswordHint()
Returns the password hint
public
getPasswordHint([mixed $locale = NULL ]) : string
Parameters
- $locale : mixed = NULL
Return values
string —getPrevImage()
Return the previous Image
public
getPrevImage() : object
Return values
object —getPublishDate()
Returns the publish date
public
getPublishDate() : string
Return values
string —getShow()
Returns true published
public
getShow() : bool
Tags
Return values
bool —getSizedImage()
(non-PHPdoc)
public
getSizedImage(mixed $size) : string
Parameters
- $size : mixed
-
how big an image is wanted
Tags
Return values
string —getSortOrder()
Returns the sort order
public
getSortOrder() : string
Return values
string —getState()
Returns the state field of the image
public
getState([mixed $locale = NULL ]) : string
Parameters
- $locale : mixed = NULL
Return values
string —getTags()
Returns the tag data
public
getTags() : string
Return values
string —getThumb()
Get a default-sized thumbnail of this image.
public
getThumb([mixed $type = 'image' ]) : string
Parameters
- $type : mixed = 'image'
Return values
string —getThumbCropping()
Returns an array of cropping parameters. Used as a "helper" function for various inherited getThumb() methods
public
getThumbCropping(mixed $ts, mixed $sw, mixed $sh) : mixed
Parameters
- $ts : mixed
- $sw : mixed
- $sh : mixed
Return values
mixed —getThumbDimensions()
Returns an array with widht and height the sidecar thumb image
public
getThumbDimensions() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getThumbHeight()
Returns the height of the image. Here just the same as getHeight().
public
getThumbHeight() : int
Tags
Return values
int —getThumbImageFile()
Returns the image file name for the thumbnail image.
public
getThumbImageFile([string $path = NULL ]) : string
Parameters
- $path : string = NULL
-
override path
Return values
string —getThumbWidth()
Returns the width of the thumb. Here just the same as getWidth().
public
getThumbWidth() : int
Tags
Return values
int —getTitle()
Returns the title
public
getTitle([mixed $locale = NULL ]) : string
Parameters
- $locale : mixed = NULL
Return values
string —getUser()
Returns the guest user
public
getUser() : string
Return values
string —getWatermark()
Returns the custom watermark name
public
getWatermark() : string
Return values
string —getWidth()
Returns the width of the image
public
getWidth() : int
Return values
int —getWMUse()
Returns the custom watermark usage
public
getWMUse() : bool
Return values
bool —hasExpiration()
Returns true if the item will be automatically unpublished by a not yet reached future expire date
public
hasExpiration() : bool
Tags
Return values
bool —hasExpired()
Returns true if the items has been unpublished after reaching the set expire date.
public
hasExpired() : bool
Tags
Return values
bool —hasExpireDate()
Returns true if the item has a proper expire date set no matter if it has expired already or will expire in the future
public
hasExpireDate() : bool
Tags
Return values
bool —hasFutureDate()
Returns the future date (publishdate for gallery, date for Zenpage items) if set to the future only
public
hasFutureDate() : string
Tags
Return values
string —| null
hasInactiveExpiration()
Returns true if a future expiredate is set but the item is unpublished
public
hasInactiveExpiration() : bool
Tags
Return values
bool —hasInactivePublishSchedule()
Returns true if the item has a future date but is not published
public
hasInactivePublishSchedule() : bool
Tags
Return values
bool —hasPublishSchedule()
Returns true if the item will be automatically published by a future date set
public
hasPublishSchedule() : bool
Tags
Return values
bool —hasTag()
Checks if an object has a tag assigned.
public
hasTag(string $checktag) : bool
Parameters
- $checktag : string
-
tag to check for
Return values
bool —instantiate()
}
public
instantiate( $tablename, $unique_set[, $cache_by = NULL ][, $use_cache = true ][, $is_transient = false ][, $allowCreate = true ]) : bool
Prime instantiator for Zenphoto objects
Parameters
- $tablename :
-
The name of the database table
- $unique_set :
-
An array of unique fields
- $cache_by : = NULL
- $use_cache : = true
- $is_transient : = false
-
Set true to prevent database insertion
- $allowCreate : = true
-
Set true to allow a new object to be made.
Return values
bool —will be true if the unique_set does not already exist
isImageClass()
Returns true if the object is a zenphoto 'image'
public
static isImageClass([object $image = NULL ]) : bool
Parameters
- $image : object = NULL
Tags
Return values
bool —isLandscape()
Returns true if the image has landscape orientation
public
isLandscape([string $type = 'image' ]) : bool
Parameters
- $type : string = 'image'
-
'image' or 'thumb' - the latter may be different on non image "image items"
Tags
Return values
bool —isMyItem()
Checks basic access rights of an object
public
isMyItem(bit $action) : mixed
Parameters
- $action : bit
-
what the caller wants to do
Return values
mixed —isPhoto()
Returns true if the image is a "photo"
public
isPhoto() : bool
Tags
Return values
bool —isPortrait()
Returns true if the image has portrait orientation
public
isPortrait([string $type = 'image' ]) : bool
Parameters
- $type : string = 'image'
-
'image' or 'thumb' - the latter may be different on non image "image items"
Tags
Return values
bool —isProtected()
returns true if there is any protection on the image
public
isProtected() : mixed
Return values
mixed —isPublic()
Returns true if this image is published and also its album and all of its parents.
public
isPublic() : bool
Tags
Return values
bool —isPublished()
Returns true if the item itself is published
public
isPublished([bool $use_dbvalue = false ]) : bool
Parameters
- $use_dbvalue : bool = false
-
Set to true to use the actual db value stored and not the possibly temporary modified value (e.g. if in scheduled publishing or expiration)
Tags
Return values
bool —isSquare()
Returns true if the image is a square
public
isSquare([string $type = 'image' ]) : bool
Parameters
- $type : string = 'image'
-
'image' or 'thumb' - the latter may be different on non image "image items"
Tags
Return values
bool —isVideo()
Returns true if the image is an "video" file
public
isVideo() : bool
Tags
Return values
bool —move()
Change one or more values of the unique set assigned to this record.
public
move(mixed $new_unique_set) : mixed
Checks if the record already exists first, if so returns false. If successful returns true and changes $this->unique_set A call to move is instant, it does not require a save() following it.
Parameters
- $new_unique_set : mixed
Return values
mixed —newImage()
Returns a new "image" object based on the file extension
public
static newImage(object $album, string $filename[, bool $quiet = false ]) : object
Parameters
- $album : object
-
the owner album
- $filename : string
-
the filename
- $quiet : bool = false
-
set true to supress error messages (used by loadimage)
Tags
Return values
object —remove()
Deletes object from the database
public
remove() : bool
Return values
bool —rename()
Renames an image to a new filename, keeping it in the same album. Convenience for move($image->album, $newfilename).
public
rename(string $newfilename) : bool
Returns true on success and false on failure.
Parameters
- $newfilename : string
-
the new file name of the image file.
Return values
bool —save()
Save the updates made to this object since the last update. Returns true if successful, false if not.
public
save([bool $checkupdates = false ]) : mixed
Parameters
- $checkupdates : bool = false
-
Default false. If true the internal $updates property is checked for actual changes so unnecessary saving is skipped. Applies to already existing objects only.
Return values
mixed —set()
Set a variable in this object. Does not persist to the database until save() is called. So, IMPORTANT: Call save() after set() to persist.
public
set(mixed $var, mixed $value) : mixed
If the requested variable is not in the database, sets it in temp storage, which won't be persisted to the database.
Parameters
- $var : mixed
- $value : mixed
Return values
mixed —setCity()
Stores the city field of the image
public
setCity(string $city) : mixed
Parameters
- $city : string
-
text for the city
Return values
mixed —setCodeblock()
set the codeblocks as an serialized array
public
setCodeblock(mixed $cb) : mixed
Parameters
- $cb : mixed
Return values
mixed —setCommentsAllowed()
Sets the comments allowed flag
public
setCommentsAllowed(bool $commentson) : mixed
Parameters
- $commentson : bool
-
true if they are allowed
Return values
mixed —setCopyright()
Stores the text for the copyright field of the image
public
setCopyright(string $copyright) : mixed
Parameters
- $copyright : string
-
text for the copyright field
Return values
mixed —setCountry()
Stores the country field of the image
public
setCountry(string $country) : mixed
Parameters
- $country : string
-
text for the country filed
Return values
mixed —setCredit()
Stores the credit field of the image
public
setCredit(string $credit) : mixed
Parameters
- $credit : string
-
text for the credit field
Return values
mixed —setCustomData()
Sets the custom data field
public
setCustomData(string $val) : mixed
Parameters
- $val : string
-
the value to be put in custom_data
Return values
mixed —setDateTime()
Stores the date
public
setDateTime(string $datetime) : mixed
Parameters
- $datetime : string
-
formatted date
Return values
mixed —setDesc()
Stores the description
public
setDesc(string $desc) : mixed
Parameters
- $desc : string
-
description text
Return values
mixed —setExpireDate()
sets the expire date
public
setExpireDate(mixed $ed) : mixed
Parameters
- $ed : mixed
Return values
mixed —setLastChange()
stores the current date in the format 'Y-m-d H:i:s' as the last change date
public
setLastChange() : mixed
Return values
mixed —setLastchangeUser()
stores the last change user
public
setLastchangeUser(mixed $a) : mixed
Parameters
- $a : mixed
Tags
Return values
mixed —setLocation()
Stores the location field of the image
public
setLocation(string $location) : mixed
Parameters
- $location : string
-
text for the location
Return values
mixed —setOwner()
public
setOwner(mixed $owner) : mixed
Parameters
- $owner : mixed
Return values
mixed —setParentID()
Sets the ParentID field
public
setParentID( $v) : mixed
Parameters
Return values
mixed —setPassword()
Sets the encrypted password
public
setPassword(string $pwd) : mixed
Parameters
- $pwd : string
-
the cleartext password
Return values
mixed —setPasswordHint()
Sets the password hint
public
setPasswordHint(string $hint) : mixed
Parameters
- $hint : string
-
the hint text
Return values
mixed —setPublishDate()
sets the publish date
public
setPublishDate(mixed $ed) : mixed
Parameters
- $ed : mixed
Return values
mixed —setPublished()
Stores the published value
public
setPublished(bool $published) : mixed
Parameters
- $published : bool
-
True if the item is published
Tags
Return values
mixed —setShow()
Stores the published value
public
setShow(bool $show) : mixed
Parameters
- $show : bool
-
True if the album is published
Tags
Return values
mixed —setSortOrder()
Stores the sort order
public
setSortOrder(string $sortorder) : mixed
Parameters
- $sortorder : string
-
image sort order
Return values
mixed —setState()
Stores the state field of the image
public
setState(string $state) : mixed
Parameters
- $state : string
-
text for the state
Return values
mixed —setTags()
Stores tag information
public
setTags(string $tags) : mixed
Parameters
- $tags : string
-
the tag list
Return values
mixed —setTitle()
Stores the title
public
setTitle(string $title) : mixed
Parameters
- $title : string
-
the title
Return values
mixed —setUpdatedDateAlbum()
Sets the current date to the images'album and all of its parent albums recursively
public
setUpdatedDateAlbum() : mixed
Tags
Return values
mixed —setUser()
Sets the guest user
public
setUser(string $user) : mixed
Parameters
- $user : string
Return values
mixed —setWatermark()
Set custom watermark
public
setWatermark(string $wm) : mixed
Parameters
- $wm : string
Return values
mixed —setWMUse()
Sets the custom watermark usage
public
setWMUse( $use) : mixed
Parameters
Return values
mixed —updateDimensions()
Update this object's values for width and height.
public
updateDimensions() : mixed
Return values
mixed —updateMetaData()
Processes multi-media file metadata (non-PHPdoc)
public
updateMetaData() : mixed
Tags
Return values
mixed —classSetup()
generic "image" class setup code Returns true if valid image.
protected
classSetup(object &$album, string $filename) : bool
Parameters
- $album : object
-
the images' album
- $filename : string
-
of the image
Return values
bool —fileChanged()
Returns true if the file has changed since last time we looked
protected
fileChanged() : bool
Return values
bool —setDefaults()
Sets default values for new objects using the set() method.
protected
setDefaults() : mixed
Should do nothing in the base class; subclasses should override.
Return values
mixed —addToCache()
add the entry to the cache
private
addToCache( $entry) : mixed
Parameters
Return values
mixed —getFromCache()
check the cache for presence of the entry and return it if found
private
getFromCache() : mixed
Return values
mixed —getIPTCTag()
Fetches a single tag from IPTC data
private
getIPTCTag(string $tag, mixed $iptc) : string
Parameters
- $tag : string
-
the metadata tag sought
- $iptc : mixed
Return values
string —getIPTCTagArray()
Fetches the IPTC array for a single tag.
private
getIPTCTagArray(string $tag, mixed $iptc) : array<string|int, mixed>
Parameters
- $tag : string
-
the metadata tag sought
- $iptc : mixed
Return values
array<string|int, mixed> —getMetaDataID3()
"video" metadata support function
private
getMetaDataID3() : mixed
Return values
mixed —load()
Load the data array from the database, using the unique id set to get the unique record.
private
load(bool $allowCreate) : false
Parameters
- $allowCreate : bool
-
set to true to enable new object creation.
Return values
false —if the record already exists, true if a new record was created.
prepIPTCString()
Returns the IPTC data converted into UTF8
private
prepIPTCString(string $iptcstring, string $characterset) : string
Parameters
- $iptcstring : string
-
the IPTC data
- $characterset : string
-
the internal encoding of the data