Methods summary
public
Image
|
#
__construct( object $album, sting $filename, $quiet = false )
Constructor for class-image
Constructor for class-image
Do not call this constructor directly unless you really know what you are doing!
Use instead the function newImage() which will instantiate an object of the
correct class for the file type.
Parameters
- $album
- $album the owning album
- $filename
- the filename of the image
- $quiet
Returns
Overrides
|
protected
|
#
setDefaults( )
(non-PHPdoc)
See
PersistentObject::setDefaults()
Overrides
|
protected
boolean
|
#
classSetup( object & $album, string $filename )
generic "image" class setup code
Returns true if valid image.
generic "image" class setup code
Returns true if valid image.
Parameters
- $album
- the images' album
- $filename
- of the image
Returns
boolean
|
public
string
|
#
getFileName( )
Returns the image filename
Returns the image filename
Returns
string
|
protected
boolean
|
#
fileChanged( )
Returns true if the file has changed since last time we looked
Returns true if the file has changed since last time we looked
Returns
boolean
|
public
array
|
#
getMetaData( )
Returns an array of EXIF data
Returns an array of EXIF data
Returns
array
|
public
|
|
public
array
|
#
getGeodata( )
If there is valid GPS data returns key value array with "long" and "lat" keys
otherwise an empty array
If there is valid GPS data returns key value array with "long" and "lat" keys
otherwise an empty array
Returns
array
Since
ZenphotoCMS 1.5.8 - Moved/adapted from the offical Zenphoto GoogleMap plugin by Stephen Billard (sbillard) & Vincent Bourganel (vincent3569)
|
public
|
#
updateDimensions( )
Update this object's values for width and height.
Update this object's values for width and height.
|
public
integer
|
#
getWidth( )
Returns the width of the image
Returns the width of the image
Returns
integer
|
public
integer
|
#
getHeight( )
Returns the height of the image
Returns the height of the image
Returns
integer
|
public
array
|
#
getThumbDimensions( )
Returns an array with widht and height the thumb. Here this is just a wrapper for getWidth() and getHeight()
Returns an array with widht and height the thumb. Here this is just a wrapper for getWidth() and getHeight()
Child (base) class handlers of non image file formats (e.g. video, textobject) where the actual "image" and the sidecar thumb are not the same
file need to override this and provide the actual dimensions of the thumb using zp_getImageDims($thumbfile).
Otherwise thumb generation may be distorted.
Returns
array
Since
ZephotoCMS 1.5.8
|
public
integer
|
#
getThumbWidth( )
Returns the width of the thumb. Here just the same as getWidth().
Returns the width of the thumb. Here just the same as getWidth().
Returns
integer
Since
ZephotoCMS 1.5.8
See
getThumbDimensions() for specific usage
|
public
integer
|
#
getThumbHeight( )
Returns the height of the image. Here just the same as getHeight().
Returns the height of the image. Here just the same as getHeight().
Returns
integer
Since
ZephotoCMS 1.5.8
See
getThumbDimensions() for specific usage
|
public
boolean|string
|
#
getOrientation( string $type = 'image' )
Returns 'is_square', 'is_landscape', 'is_portrait' if the original image's widht and height match.
Returns 'is_square', 'is_landscape', 'is_portrait' if the original image's widht and height match.
Parameters
- $type
- 'image' or 'thumb' - the latter may be different on non image "image items"
Returns
boolean|string
Since
Zenphoto 1.5.8
|
public
boolean
|
#
isLandscape( string $type = 'image' )
Returns true if the image has landscape orientation
Returns true if the image has landscape orientation
Parameters
- $type
- 'image' or 'thumb' - the latter may be different on non image "image items"
Returns
boolean
Since
Zenphoto 1.5.8
|
public
boolean
|
#
isSquare( string $type = 'image' )
Returns true if the image is a square
Returns true if the image is a square
Parameters
- $type
- 'image' or 'thumb' - the latter may be different on non image "image items"
Returns
boolean
Since
Zenphoto 1.5.8
|
public
boolean
|
#
isPortrait( string $type = 'image' )
Returns true if the image has portrait orientation
Returns true if the image has portrait orientation
Parameters
- $type
- 'image' or 'thumb' - the latter may be different on non image "image items"
Returns
boolean
Since
Zenphoto 1.5.8
|
public
object
|
#
getAlbum( )
Returns the album that holds this image
Returns the album that holds this image
Returns
object
|
public
string
|
#
getAlbumName( )
Retuns the folder name of the album that holds this image
Retuns the folder name of the album that holds this image
Returns
string
|
public
string
|
#
getLocation( $locale = NULL )
Returns the location field of the image
Returns the location field of the image
Returns
string
|
public
|
#
setLocation( string $location )
Stores the location field of the image
Stores the location field of the image
Parameters
- $location
- text for the location
|
public
string
|
#
getCity( $locale = NULL )
Returns the city field of the image
Returns the city field of the image
Returns
string
|
public
|
#
setCity( string $city )
Stores the city field of the image
Stores the city field of the image
Parameters
|
public
string
|
#
getState( $locale = NULL )
Returns the state field of the image
Returns the state field of the image
Returns
string
|
public
|
#
setState( string $state )
Stores the state field of the image
Stores the state field of the image
Parameters
- $state
- text for the state
|
public
string
|
#
getCountry( $locale = NULL )
Returns the country field of the image
Returns the country field of the image
Returns
string
|
public
|
#
setCountry( string $country )
Stores the country field of the image
Stores the country field of the image
Parameters
- $country
- text for the country filed
|
public
string
|
#
getCredit( $locale = NULL )
Returns the credit field of the image
Returns the credit field of the image
Returns
string
|
public
|
#
setCredit( string $credit )
Stores the credit field of the image
Stores the credit field of the image
Parameters
- $credit
- text for the credit field
|
public
string
|
#
getCopyright( $locale = NULL )
Returns the copyright field of the image
Returns the copyright field of the image
Returns
string
|
public
|
#
setCopyright( string $copyright )
Stores the text for the copyright field of the image
Stores the text for the copyright field of the image
Parameters
- $copyright
- text for the copyright field
|
public
string|null
|
#
getCopyrightNotice( string $locale = null )
Returns the content of the copyright field if set.
If not it tries the following fallbacks:
Returns the content of the copyright field if set.
If not it tries the following fallbacks:
- IPTCCopyright field
- EXIFCopyright field
- "coypright_image_notice" option
- Owner
Parameters
Returns
string|null
Since
ZenphotoCMS 1.5.8
|
public
|
#
getCopyrightRightsholder( )
Gets the general option "copyright_image_rightsholder" respectively "copyright_image_rightsholder_custom"
If set to "none" the following fallbacks are tried.
Gets the general option "copyright_image_rightsholder" respectively "copyright_image_rightsholder_custom"
If set to "none" the following fallbacks are tried.
- EXIFArtist
- VideoArtist (for multimedia "images")
– IPTCByLine
- the owner (fullname if available)
Since
ZenphotoCMS 1.5.8
|
public
string
|
#
getCopyrightURL( )
Gets the image copyright URL
Gets the image copyright URL
Returns
string
Since
ZenhphotoCMS 1.5.8
|
public
boolean
|
#
remove( boolean $clean,… )
Permanently delete this image (permanent: be careful!)
Returns the result of the unlink operation (whether the delete was successful)
Permanently delete this image (permanent: be careful!)
Returns the result of the unlink operation (whether the delete was successful)
Parameters
- $clean,…
- whether to remove the database entry.
Returns
boolean
Overrides
|
public
integer
|
#
move( Album $newalbum, string $newfilename = null )
Moves an image to a new album and/or filename (rename).
Returns 0 on success and error indicator on failure.
Moves an image to a new album and/or filename (rename).
Returns 0 on success and error indicator on failure.
Parameters
- $newalbum
- the album to move this file to. Must be a valid Album object.
- $newfilename
- the new file name of the image in the specified album.
Returns
integer
Overrides
|
public
boolean
|
#
rename( string $newfilename )
Renames an image to a new filename, keeping it in the same album. Convenience for move($image->album, $newfilename).
Returns true on success and false on failure.
Renames an image to a new filename, keeping it in the same album. Convenience for move($image->album, $newfilename).
Returns true on success and false on failure.
Parameters
- $newfilename
- the new file name of the image file.
Returns
boolean
|
public
|
#
copy( string $newalbum )
Copies the image to a new album, along with all metadata.
Copies the image to a new album, along with all metadata.
Parameters
- $newalbum
- the destination album
Overrides
|
public
string
|
#
getLink( )
Returns a path urlencoded image page link for the image
Returns a path urlencoded image page link for the image
Returns
string
|
public
string
|
#
getFullImage( string $path = WEBPATH )
Returns a path to the original image in the original folder.
Returns a path to the original image in the original folder.
Parameters
- $path
- the "path" to the image. Defaults to the simple WEBPATH
Returns
string
|
public
|
#
getFullImageURL( )
returns URL to the original image
returns URL to the original image
|
public
string
|
#
getSizedImage( integer $size )
Returns a path to a sized version of the image
Returns a path to a sized version of the image
Parameters
- $size
- how big an image is wanted
Returns
string
|
public
string
|
#
getCustomImage( integer $size, integer $width, integer $height, integer $cropw, integer $croph, integer $cropx, integer $cropy, boolean $thumbStandin = false, boolean $effects = NULL )
Get a custom sized version of this image based on the parameters.
Get a custom sized version of this image based on the parameters.
Parameters
- $size
- size
- $width
- width
- $height
- height
- $cropw
- crop width
- $croph
- crop height
- $cropx
- crop x axis
- $cropy
- crop y axis
- $thumbStandin
- set to true to treat as thumbnail
- $effects
- set to desired image effect (e.g. 'gray' to force gray scale)
Returns
string
|
public
string
|
#
getContent( )
Returns the default sized image HTML
Returns the default sized image HTML
Returns
string
|
public
s
|
#
getThumbImageFile( string $path,… )
Returns the image file name for the thumbnail image.
Returns the image file name for the thumbnail image.
Parameters
Returns
s
|
public
|
#
getThumbCropping( string $ts, $sw, $sh )
Returns an array of cropping parameters. Used as a "helper" function for various
inherited getThumb() methods
Returns an array of cropping parameters. Used as a "helper" function for various
inherited getThumb() methods
Parameters
- $ts
- $type the type of thumb (in case it ever matters in the cropping, now it does not.)
- $sw
- $sh
|
public
string
|
#
getThumb( $type = 'image' )
Get a default-sized thumbnail of this image.
Get a default-sized thumbnail of this image.
Returns
string
|
public
integer
|
#
getIndex( )
Get the index of this image in the album, taking sorting into account.
Get the index of this image in the album, taking sorting into account.
Returns
integer
|
public
object
|
|
public
object
|
#
getPrevImage( )
Return the previous Image
Return the previous Image
Returns
object
|
public
string
|
#
getWatermark( )
Returns the custom watermark name
Returns the custom watermark name
Returns
string
|
public
|
|
public
boolean
|
#
getWMUse( )
Returns the custom watermark usage
Returns the custom watermark usage
Returns
boolean
|
public
|
#
setWMUse( $use )
Sets the custom watermark usage
Sets the custom watermark usage
Parameters
|
public
string
|
#
getOwner( boolean $fullname = false )
Gets the owner of the image
Gets the owner of the image
Parameters
- $fullname
- Set to true to get the full name (if the owner is a vaild user of the site and has the full name defined)
Returns
string
|
public
|
|
public
|
#
isMyItem( bit $action )
Checks basic access rights of an object
Checks basic access rights of an object
Parameters
- $action
- what the caller wants to do
Overrides
|
public
|
#
checkAccess( string & $hint = NULL, string & $show = NULL )
returns true if user is allowed to see the image
returns true if user is allowed to see the image
Parameters
Overrides
|
public
|
#
checkforGuest( unknown_type & $hint = NULL, unknown_type & $show = NULL )
Checks if guest is loggedin for the album
Checks if guest is loggedin for the album
Parameters
|
public
|
#
isProtected( )
returns true if there is any protection on the image
|
public
boolean
|
#
isPublic( )
Returns true if this image is published and also its album and all of its parents.
Returns true if this image is published and also its album and all of its parents.
Returns
boolean
Since
Zenphoto 1.5.5
|
public
integer|false
|
#
getFilesize( )
Returns the filesize in bytes of the full image
Returns the filesize in bytes of the full image
Returns
integer|false
Since
ZenphotoCMS 1.5.2
|
public
|
#
setUpdatedDateAlbum( )
Sets the current date to the images'album and all of its parent albums recursively
Sets the current date to the images'album and all of its parent albums recursively
Since
Zenphoto 1.5.5
|