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

Class: _Image

Source Location: /class-image.php

Class _Image

Descendants
Child Class Description
Transientimage class transientimage
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::$commentcount
ThemeObject::$comments

Inherited From PersistentObject

PersistentObject::$cache_by
PersistentObject::$data
PersistentObject::$id
PersistentObject::$loaded
PersistentObject::$table
PersistentObject::$tempdata
PersistentObject::$transient
PersistentObject::$unique_set
PersistentObject::$updates
PersistentObject::$use_cache

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()
Prime instantiator for Zenphoto objects
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::getID()
Returns the id
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.

[ Top ]
Property Summary
mixed   $album  
mixed   $displayname  
mixed   $exists  
mixed   $filemtime  
mixed   $filename  
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   _Image()   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.
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   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.
void   getDefaultTitle()  
string   getFileName()   Returns the image filename
string   getFullImage()   Returns a path to the original image in the original folder.
int   getHeight()   Returns the height of the image
string   getImageFootprint()   Returns the disk size of the image
string   getImageLink()   Returns an image page link for the image
int   getIndex()   Get the index of this image in the album, taking sorting into account.
string   getIPTCTag()   For internal use--fetches a single tag from IPTC data
array   getIPTCTagArray()   For internal use--fetches the IPTC array for a single tag.
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   moveImage()   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 moveImage($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   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 90]

[ Top ]
mixed   $displayname [line 89]

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

[ Top ]
mixed   $filemtime [line 93]
API Tags:
Access:  protected


[ Top ]
mixed   $filename [line 85]

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


[ Top ]
mixed   $localpath [line 88]

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

Redefinition of:
ThemeObject::$manage_rights

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

Redefinition of:
ThemeObject::$manage_some_rights

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

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

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


[ Top ]
mixed   $view_rights = VIEW_ALBUMS_RIGHTS [line 97]

Redefinition of:
ThemeObject::$view_rights

[ Top ]
mixed   $webpath [line 87]

[ Top ]
Methods
Constructor _Image  [line 115]

  Image _Image( object &$album, sting $filename  )

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


[ Top ]
checkAccess  [line 1073]

  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 1086]

  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 152]

  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 753]

  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 ]
getAlbum  [line 564]

  object getAlbum( )

Returns the album that holds this image



[ Top ]
getAlbumName  [line 571]

  string getAlbumName( )

Retuns the folder name of the album that holds this image



[ Top ]
getCity  [line 594]

  string getCity( )

Returns the city field of the image



[ Top ]
getCopyright  [line 658]

  string getCopyright( )

Returns the copyright field of the image



[ Top ]
getCountry  [line 626]

  string getCountry( )

Returns the country field of the image



[ Top ]
getCredit  [line 642]

  string getCredit( )

Returns the credit field of the image



[ Top ]
getCustomImage  [line 843]

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

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

Parameters:
string   $alt:  Alt text for the url
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
string   $class:  Optional style class
string   $id:  Optional style id
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 ]
getDefaultTitle  [line 179]

  void getDefaultTitle( )



[ Top ]
getFileName  [line 188]

  string getFileName( )

Returns the image filename



[ Top ]
getFullImage  [line 805]

  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 ]
getHeight  [line 549]

  int getHeight( )

Returns the height of the image



[ Top ]
getImageFootprint  [line 1010]

  string getImageFootprint( )

Returns the disk size of the image



[ Top ]
getImageLink  [line 793]

  string getImageLink( )

Returns an image page link for the image



[ Top ]
getIndex  [line 942]

  int getIndex( )

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



[ Top ]
getIPTCTag  [line 456]

  string getIPTCTag( string $tag, $iptc  )

For internal use--fetches a single tag from IPTC data

Parameters:
string   $tag:  the metadata tag sought
   $iptc: 


[ Top ]
getIPTCTagArray  [line 477]

  array getIPTCTagArray( string $tag, $iptc  )

For internal use--fetches the IPTC array for a single tag.

Parameters:
string   $tag:  the metadata tag sought
   $iptc: 


[ Top ]
getLocation  [line 578]

  string getLocation( )

Returns the location field of the image



[ Top ]
getMetaData  [line 207]

  array getMetaData( )

Returns an array of EXIF data



[ Top ]
getNextImage  [line 978]

  object getNextImage( )

Returns the next Image.



[ Top ]
getOwner  [line 1054]

  void getOwner( )

Owner functions



[ Top ]
getPrevImage  [line 994]

  object getPrevImage( )

Return the previous Image



[ Top ]
getSizedImage  [line 815]

  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 610]

  string getState( )

Returns the state field of the image



[ Top ]
getThumb  [line 916]

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

Get a default-sized thumbnail of this image.

Parameters:
   $type: 


Redefined in descendants as:

[ Top ]
getThumbCropping  [line 883]

  void getThumbCropping( 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.)


[ Top ]
getThumbImageFile  [line 869]

  s getThumbImageFile( [string $path = NULL]  )

Returns the image file name for the thumbnail image.

Parameters:
string   $path:  override path


Redefined in descendants as:

[ Top ]
getWatermark  [line 1019]

  string getWatermark( )

Returns the custom watermark name



[ Top ]
getWidth  [line 534]

  int getWidth( )

Returns the width of the image



[ Top ]
getWMUse  [line 1037]

  bool getWMUse( )

Returns the custom watermark usage



[ Top ]
isMyItem  [line 1065]

  void isMyItem( $action  )

Parameters:
   $action: 


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

[ Top ]
isProtected  [line 1098]

  void isProtected( )

returns true if there is any protection on the image



[ Top ]
moveImage  [line 700]

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


[ Top ]
remove  [line 676]

  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 744]

  bool rename( string $newfilename  )

Renames an image to a new filename, keeping it in the same album. Convenience for moveImage($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 603]

  void setCity( string $city  )

Stores the city field of the image

Parameters:
string   $city:  text for the city


[ Top ]
setCopyright  [line 667]

  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 635]

  void setCountry( string $country  )

Stores the country field of the image

Parameters:
string   $country:  text for the country filed


[ Top ]
setCredit  [line 651]

  void setCredit( string $credit  )

Stores the credit field of the image

Parameters:
string   $credit:  text for the credit field


[ Top ]
setLocation  [line 587]

  void setLocation( string $location  )

Stores the location field of the image

Parameters:
string   $location:  text for the location


[ Top ]
setOwner  [line 1061]

  void setOwner( $owner  )

Parameters:
   $owner: 


[ Top ]
setState  [line 619]

  void setState( string $state  )

Stores the state field of the image

Parameters:
string   $state:  text for the state


[ Top ]
setWatermark  [line 1028]

  void setWatermark( string $wm  )

Set custom watermark

Parameters:
string   $wm: 


[ Top ]
setWMUse  [line 1046]

  void setWMUse( $use $use  )

Sets the custom watermark usage

Parameters:
$use   $use: 


[ Top ]
updateDimensions  [line 506]

  void updateDimensions( )

Update this object's values for width and height.



Redefined in descendants as:

[ Top ]
updateMetaData  [line 222]

  void updateMetaData( )

Parses Exif/IPTC data



Redefined in descendants as:

[ Top ]

Documentation generated on Tue, 20 Dec 2011 16:06:47 +0100 by phpDocumentor 1.4.3