[ class tree: classes ] [ index: classes ] [ all elements ]

Class: Image

Source Location: /class-image.php

Class Image

Descendants
Child Class Description
Transientimage handles 'picture' images
TextObject Core class for handling "non-image" files
Video handles 'picture' images

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From ThemeObject

ThemeObject::$comments

Inherited From PersistentObject

PersistentObject::$id
PersistentObject::$loaded
PersistentObject::$table
PersistentObject::$transient

Inherited From MediaObject

MediaObject::__construct()
Class instantiator
MediaObject::getDesc()
Returns the description
MediaObject::getExpireDate()
Returns the expire date
MediaObject::getPassword()
Returns the password
MediaObject::getPasswordHint()
Returns the password hint
MediaObject::getPublishDate()
Returns the publish date
MediaObject::getSortOrder()
Returns the sort order
MediaObject::getUser()
Returns the guest user
MediaObject::setDesc()
Stores the description
MediaObject::setExpireDate()
sets the expire date
MediaObject::setPassword()
Sets the encrypted password
MediaObject::setPasswordHint()
Sets the password hint
MediaObject::setPublishDate()
sets the publish date
MediaObject::setSortOrder()
Stores the sort order
MediaObject::setUser()
Sets the guest user

Inherited From ThemeObject

ThemeObject::__construct()
Class instantiator
ThemeObject::addComment()
Adds comments to the album assumes data is coming straight from GET or POST
ThemeObject::checkAccess()
Checks if viewing of object is allowed
ThemeObject::checkForGuest()
returns false (deny) if gallery is "private"
ThemeObject::countHit()
counts visits to the object
ThemeObject::getCodeblock()
Returns the codeblocks as an serialized array
ThemeObject::getCommentCount()
Returns the count of comments in the album. Ignores comments in moderation
ThemeObject::getComments()
Returns an array of comments for this album
ThemeObject::getCommentsAllowed()
Retuns true if comments are allowed
ThemeObject::getCustomData()
returns the custom data field
ThemeObject::getDateTime()
Returns the unformatted date
ThemeObject::getHitcounter()
Returns the hitcount
ThemeObject::getParentID()
Returns the partent id
ThemeObject::getShow()
Returns true published
ThemeObject::getTags()
Returns the tag data
ThemeObject::getTitle()
Returns the title
ThemeObject::hasTag()
Checks if an object has a tag assigned.
ThemeObject::isMyItem()
Checks basic access rights of an object
ThemeObject::setCodeblock()
set the codeblocks as an serialized array
ThemeObject::setCommentsAllowed()
Sets the comments allowed flag
ThemeObject::setCustomData()
Sets the custom data field
ThemeObject::setDateTime()
Stores the date
ThemeObject::setParentID()
Sets the ParentID field
ThemeObject::setShow()
Stores the published value
ThemeObject::setTags()
Stores tag information
ThemeObject::setTitle()
Stores the title

Inherited From PersistentObject

PersistentObject::PersistentObject()
PersistentObject::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.
PersistentObject::get()
Get the value of a variable. If $current is false, return the value as of the last save of this object.
PersistentObject::getData()
returns the database record of the object
PersistentObject::getID()
Returns the id
PersistentObject::instantiate()
Prime instantiator for Zenphoto objects
PersistentObject::move()
Change one or more values of the unique set assigned to this record.
PersistentObject::remove()
Deletes object from the database
PersistentObject::save()
Save the updates made to this object since the last update. Returns true if successful, false if not.
PersistentObject::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.
PersistentObject::setDefaults()
Sets default values for new objects using the set() method.
PersistentObject::__toString()
"Magic" function to return a string identifying the object when it is treated as a string

[ Top ]
Property Summary
mixed   $album  
mixed   $albumlink  
mixed   $albumname  
mixed   $albumnamealbum  
mixed   $displayname  
mixed   $exists  
mixed   $filemtime  
mixed   $filename  
mixed   $imagefolder  
mixed   $index  
mixed   $localpath  
mixed   $manage_rights  
mixed   $manage_some_rights  
mixed   $objectsThumb  
mixed   $sidecars  
mixed   $sortorder  
mixed   $view_rights  
mixed   $webpath  

[ Top ]
Method Summary
Image   __construct()   Constructor for class-image
void   checkAccess()   returns true if user is allowed to see the image
void   checkforGuest()   Checks if guest is loggedin for the album
bool   classSetup()   generic "image" class setup code Returns true if valid image.
void   copy()   Copies the image to a new album, along with all metadata.
bool   fileChanged()   Returns true if the file has changed since last time we looked
object   getAlbum()   Returns the album that holds this image
string   getAlbumName()   Retuns the folder name of the album that holds this image
string   getCity()   Returns the city field of the image
string   getContent()   Returns the default sized image HTML
string   getCopyright()   Returns the copyright field of the image
string   getCountry()   Returns the country field of the image
string   getCredit()   Returns the credit field of the image
string   getCustomImage()   Get a custom sized version of this image based on the parameters.
string   getFileName()   Returns the image filename
string   getFullImage()   Returns a path to the original image in the original folder.
void   getFullImageURL()   returns URL to the original image
int   getHeight()   Returns the height of the image
string   getImageFootprint()   Returns the disk size of the image
string   getImageLink()   Returns a path urlencoded image page link for the image
int   getIndex()   Get the index of this image in the album, taking sorting into account.
string   getLink()   Returns a path urlencoded image page link for the image
string   getLocation()   Returns the location field of the image
array   getMetaData()   Returns an array of EXIF data
object   getNextImage()   Returns the next Image.
void   getOwner()   Owner functions
object   getPrevImage()   Return the previous Image
string   getSizedImage()   Returns a path to a sized version of the image
string   getState()   Returns the state field of the image
string   getThumb()   Get a default-sized thumbnail of this image.
void   getThumbCropping()   Returns an array of cropping parameters. Used as a "helper" function for various inherited getThumb() methods
s   getThumbImageFile()   Returns the image file name for the thumbnail image.
string   getWatermark()   Returns the custom watermark name
int   getWidth()   Returns the width of the image
bool   getWMUse()   Returns the custom watermark usage
void   isMyItem()  
void   isProtected()   returns true if there is any protection on the image
int   move()   Moves an image to a new album and/or filename (rename).
bool   remove()   Permanently delete this image (permanent: be careful!)
bool   rename()   Renames an image to a new filename, keeping it in the same album. Convenience for move($image->album, $newfilename).
void   setCity()   Stores the city field of the image
void   setCopyright()   Stores the text for the copyright field of the image
void   setCountry()   Stores the country field of the image
void   setCredit()   Stores the credit field of the image
void   setDefaults()   (non-PHPdoc)
void   setLocation()   Stores the location field of the image
void   setOwner()  
void   setState()   Stores the state field of the image
void   setWatermark()   Set custom watermark
void   setWMUse()   Sets the custom watermark usage
void   updateDimensions()   Update this object's values for width and height.
void   updateMetaData()   Parses Exif/IPTC data

[ Top ]
Properties
mixed   $album [line 104]

[ Top ]
mixed   $albumlink [line 107]

[ Top ]
mixed   $albumname [line 105]

[ Top ]
mixed   $albumnamealbum [line 106]

[ Top ]
mixed   $displayname [line 103]

[ Top ]
mixed   $exists = true [line 100]

Redefinition of:
PersistentObject::$exists

[ Top ]
mixed   $filemtime [line 111]

[ Top ]
mixed   $filename [line 99]

[ Top ]
mixed   $imagefolder [line 108]

[ Top ]
mixed   $index [line 109]
API Tags:
Access:  protected


[ Top ]
mixed   $localpath [line 102]

[ Top ]
mixed   $manage_rights = MANAGE_ALL_ALBUM_RIGHTS [line 113]

Redefinition of:
ThemeObject::$manage_rights

[ Top ]
mixed   $manage_some_rights = ALBUM_RIGHTS [line 114]

Redefinition of:
ThemeObject::$manage_some_rights

[ Top ]
mixed   $objectsThumb = NULL [line 117]

[ Top ]
mixed   $sidecars = array() [line 112]

[ Top ]
mixed   $sortorder [line 110]
API Tags:
Access:  protected


[ Top ]
mixed   $view_rights = ALL_ALBUMS_RIGHTS [line 115]

Redefinition of:
ThemeObject::$view_rights

[ Top ]
mixed   $webpath [line 101]

[ Top ]
Methods
Constructor __construct  [line 131]

  Image __construct( $album, sting $filename, [ $quiet = false], object &$album  )

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:
object   &$album:  the owning album
sting   $filename:  the filename of the image
   $album: 
   $quiet: 


Redefinition of:
MediaObject::__construct()
Class instantiator

Redefined in descendants as:

[ Top ]
checkAccess  [line 1251]

  void checkAccess( [ &$hint = NULL], [ &$show = NULL]  )

returns true if user is allowed to see the image

Parameters:
   &$hint: 
   &$show: 


Redefinition of:
ThemeObject::checkAccess()
Checks if viewing of object is allowed

[ Top ]
checkforGuest  [line 1264]

  void checkforGuest( [ &$hint = NULL], [ &$show = NULL], unknown_type $hint, unknown_type $show  )

Checks if guest is loggedin for the album

Parameters:
unknown_type   $hint: 
unknown_type   $show: 
   &$hint: 
   &$show: 


[ Top ]
classSetup  [line 185]

  bool classSetup( &$album, string $filename, object $album  )

generic "image" class setup code Returns true if valid image.

Parameters:
object   $album:  the images' album
string   $filename:  of the image
   &$album: 

API Tags:
Access:  protected


[ Top ]
copy  [line 862]

  void copy( string $newalbum  )

Copies the image to a new album, along with all metadata.

Parameters:
string   $newalbum:  the destination album


Redefinition of:
PersistentObject::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.

[ Top ]
fileChanged  [line 244]

  bool fileChanged( )

Returns true if the file has changed since last time we looked


API Tags:
Access:  protected


[ Top ]
getAlbum  [line 620]

  object getAlbum( )

Returns the album that holds this image



[ Top ]
getAlbumName  [line 629]

  string getAlbumName( )

Retuns the folder name of the album that holds this image



[ Top ]
getCity  [line 661]

  string getCity( [ $locale = NULL]  )

Returns the city field of the image

Parameters:
   $locale: 


[ Top ]
getContent  [line 998]

  string getContent( )

Returns the default sized image HTML



Redefined in descendants as:

[ Top ]
getCopyright  [line 753]

  string getCopyright( [ $locale = NULL]  )

Returns the copyright field of the image

Parameters:
   $locale: 


[ Top ]
getCountry  [line 707]

  string getCountry( [ $locale = NULL]  )

Returns the country field of the image

Parameters:
   $locale: 


[ Top ]
getCredit  [line 730]

  string getCredit( [ $locale = NULL]  )

Returns the credit field of the image

Parameters:
   $locale: 


[ Top ]
getCustomImage  [line 979]

  string getCustomImage( int $size, int $width, int $height, int $cropw, int $croph, int $cropx, int $cropy, [bool $thumbStandin = false], [bool $effects = NULL]  )

Get a custom sized version of this image based on the parameters.

Parameters:
int   $size:  size
int   $width:  width
int   $height:  height
int   $cropw:  crop width
int   $croph:  crop height
int   $cropx:  crop x axis
int   $cropy:  crop y axis
bool   $thumbStandin:  set to true to treat as thumbnail
bool   $effects:  set to desired image effect (e.g. 'gray' to force gray scale)


Redefined in descendants as:

[ Top ]
getFileName  [line 235]

  string getFileName( )

Returns the image filename



[ Top ]
getFullImage  [line 931]

  string getFullImage( [string $path = WEBPATH]  )

Returns a path to the original image in the original folder.

Parameters:
string   $path:  the "path" to the image. Defaults to the simple WEBPATH


[ Top ]
getFullImageURL  [line 949]

  void getFullImageURL( )

returns URL to the original image



Redefined in descendants as:
  • Video::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

[ Top ]
getHeight  [line 605]

  int getHeight( )

Returns the height of the image



[ Top ]
getImageFootprint  [line 1188]

  string getImageFootprint( )

Returns the disk size of the image



[ Top ]
getImageLink  [line 919]

  string getImageLink( )

Returns a path urlencoded image page link for the image


API Tags:
Deprecated:  since version 1.4.6


[ Top ]
getIndex  [line 1118]

  int getIndex( )

Get the index of this image in the album, taking sorting into account.



[ Top ]
getLink  [line 902]

  string getLink( )

Returns a path urlencoded image page link for the image



[ Top ]
getLocation  [line 638]

  string getLocation( [ $locale = NULL]  )

Returns the location field of the image

Parameters:
   $locale: 


[ Top ]
getMetaData  [line 254]

  array getMetaData( )

Returns an array of EXIF data



[ Top ]
getNextImage  [line 1154]

  object getNextImage( )

Returns the next Image.



[ Top ]
getOwner  [line 1231]

  void getOwner( )

Owner functions



[ Top ]
getPrevImage  [line 1171]

  object getPrevImage( )

Return the previous Image



[ Top ]
getSizedImage  [line 959]

  string getSizedImage( int $size  )

Returns a path to a sized version of the image

Parameters:
int   $size:  how big an image is wanted


Redefined in descendants as:

[ Top ]
getState  [line 684]

  string getState( [ $locale = NULL]  )

Returns the state field of the image

Parameters:
   $locale: 


[ Top ]
getThumb  [line 1095]

  string getThumb( [ $type = 'image']  )

Get a default-sized thumbnail of this image.

Parameters:
   $type: 


Redefined in descendants as:

[ Top ]
getThumbCropping  [line 1063]

  void getThumbCropping( $ts, $sw, $sh, string $type  )

Returns an array of cropping parameters. Used as a "helper" function for various inherited getThumb() methods

Parameters:
string   $type:  the type of thumb (in case it ever matters in the cropping, now it does not.)
   $ts: 
   $sw: 
   $sh: 


[ Top ]
getThumbImageFile  [line 1053]

  s getThumbImageFile( string $path  )

Returns the image file name for the thumbnail image.

Parameters:
string   $path:  override path


Redefined in descendants as:

[ Top ]
getWatermark  [line 1197]

  string getWatermark( )

Returns the custom watermark name



[ Top ]
getWidth  [line 590]

  int getWidth( )

Returns the width of the image



[ Top ]
getWMUse  [line 1215]

  bool getWMUse( )

Returns the custom watermark usage



[ Top ]
isMyItem  [line 1243]

  void isMyItem( $action  )

Parameters:
   $action: 


Redefinition of:
ThemeObject::isMyItem()
Checks basic access rights of an object

[ Top ]
isProtected  [line 1276]

  void isProtected( )

returns true if there is any protection on the image



[ Top ]
move  [line 802]

  int 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.

Parameters:
Album   $newalbum:  the album to move this file to. Must be a valid Album object.
string   $newfilename:  the new file name of the image in the specified album.


Redefinition of:
PersistentObject::move()
Change one or more values of the unique set assigned to this record.

[ Top ]
remove  [line 777]

  bool remove( bool $clean  )

Permanently delete this image (permanent: be careful!)

Returns the result of the unlink operation (whether the delete was successful)

Parameters:
bool   $clean:  whether to remove the database entry.


Redefinition of:
PersistentObject::remove()
Deletes object from the database

[ Top ]
rename  [line 853]

  bool 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.

Parameters:
string   $newfilename:  the new file name of the image file.


[ Top ]
setCity  [line 675]

  void setCity( string $city  )

Stores the city field of the image

Parameters:
string   $city:  text for the city


[ Top ]
setCopyright  [line 767]

  void setCopyright( string $copyright  )

Stores the text for the copyright field of the image

Parameters:
string   $copyright:  text for the copyright field


[ Top ]
setCountry  [line 721]

  void setCountry( string $country  )

Stores the country field of the image

Parameters:
string   $country:  text for the country filed


[ Top ]
setCredit  [line 744]

  void setCredit( string $credit  )

Stores the credit field of the image

Parameters:
string   $credit:  text for the credit field


[ Top ]
setDefaults  [line 169]

  void setDefaults( )

(non-PHPdoc)


API Tags:
See:  PersistentObject::setDefaults()
Access:  protected


Redefinition of:
PersistentObject::setDefaults()
Sets default values for new objects using the set() method.

[ Top ]
setLocation  [line 652]

  void setLocation( string $location  )

Stores the location field of the image

Parameters:
string   $location:  text for the location


[ Top ]
setOwner  [line 1239]

  void setOwner( $owner  )

Parameters:
   $owner: 


[ Top ]
setState  [line 698]

  void setState( string $state  )

Stores the state field of the image

Parameters:
string   $state:  text for the state


[ Top ]
setWatermark  [line 1206]

  void setWatermark( string $wm  )

Set custom watermark

Parameters:
string   $wm: 


[ Top ]
setWMUse  [line 1224]

  void setWMUse( $use $use  )

Sets the custom watermark usage

Parameters:
$use   $use: 


[ Top ]
updateDimensions  [line 562]

  void updateDimensions( )

Update this object's values for width and height.



Redefined in descendants as:

[ Top ]
updateMetaData  [line 271]

  void updateMetaData( )

Parses Exif/IPTC data



Redefined in descendants as:

[ Top ]

Documentation generated on Sat, 07 Jun 2014 18:03:16 +0200 by phpDocumentor 1.4.3