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

Class: _Image

Source Location: /class-image.php

Class _Image

Descendants
Child Class Description
TextObject handles 'picture' images
Video handles 'picture' images

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

Inherited From PersistentObject

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

Inherited From PersistentObject

PersistentObject::PersistentObject()
PersistentObject::cache()
Caches the current set of objects defined by a variable key $cache_by.
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::load()
Load the data array from the database, using the unique id set to get the unique record.
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   $commentcount  
mixed   $comments  
mixed   $displayname  
mixed   $exists  
mixed   $filemtime  
mixed   $filename  
mixed   $index  
mixed   $localpath  
mixed   $objectsThumb  
mixed   $sidecars  
mixed   $sortorder  
mixed   $webpath  

[ Top ]
Method Summary
Image   _Image()   Constructor for class-image
object   addComment()   Adds a comment to the image assumes data is coming straight from GET or POST
bool   classSetup()   generic "image" class setup code Returns true if valid image.
void   copyImage()   Copies the image to a new album, along with all metadata.
bool   deleteImage()   Permanently delete this image (permanent: be careful!)
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
int   getCommentCount()   Returns the count of comments for the image. Comments in moderation are not counted
array   getComments()   Returns an array of comments
bool   getCommentsAllowed()   Retuns true if comments are allowed on 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   getCustomData()   returns the custom data field
string   getCustomImage()   Get a custom sized version of this image based on the parameters.
string   getDateTime()   Returns the unformatted date of the image
void   getDefaultTitle()  
string   getDesc()   Returns the description of the image
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
bool   getShow()   Returns true if the image is set visible
string   getSizedImage()   Returns a path to a sized version of the image
int   getSortOrder()   Returns the sort order value of the image
string   getState()   Returns the state field of the image
string   getTags()   Returns the tags of the image
string   getThumb()   Get a default-sized thumbnail of this image.
s   getThumbImageFile()   Returns the image file name for the thumbnail image.
string   getTitle()   Returns the title of this image
string   getWatermark()   Returns the custom watermark name
int   getWidth()   Returns the width of the image
bool   getWMUse()   Returns the custom watermark usage
int   moveImage()   Moves an image to a new album and/or filename (rename).
string   prepIPTCString()   Returns the IPTC data converted into UTF8
bool   renameImage()   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   setCommentsAllowed()   Sets the comments allowed flag on 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   setCustomData()   Sets the custom data field
void   setDateTime()   Stores the date of the image
void   setDesc()   Stores the description of the image
void   setLocation()   Stores the location field of the image
void   setOwner()  
void   setShow()   Sets the visibility of the image
void   setSortOrder()   Sets the sort order value of the image
void   setState()   Stores the state field of the image
void   setTags()   Sets the tags of the image
void   setTitle()   Stores the title of this 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 75]

[ Top ]
mixed   $commentcount [line 77]

[ Top ]
mixed   $comments [line 76]

[ Top ]
mixed   $displayname [line 74]

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

[ Top ]
mixed   $filemtime [line 80]

[ Top ]
mixed   $filename [line 70]

[ Top ]
mixed   $index [line 78]

[ Top ]
mixed   $localpath [line 73]

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

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

[ Top ]
mixed   $sortorder [line 79]

[ Top ]
mixed   $webpath [line 72]

[ Top ]
Methods
Constructor _Image  [line 99]

  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 ]
addComment  [line 902]

  object addComment( string $name, string $email, string $website, string $comment, string $code, string $code_ok, string $ip, bool $private, bool $anon  )

Adds a comment to the image assumes data is coming straight from GET or POST

Returns a comment object

Parameters:
string   $name:  Comment author name
string   $email:  Comment author email
string   $website:  Comment author website
string   $comment:  body of the comment
string   $code:  CAPTCHA code entered
string   $code_ok:  CAPTCHA md5 expected
string   $ip:  the IP address of the comment poster
bool   $private:  set to true if the comment is for the admin only
bool   $anon:  set to true if the poster wishes to remain anonymous


[ Top ]
classSetup  [line 135]

  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: 


[ Top ]
copyImage  [line 814]

  void copyImage( string $newalbum  )

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

Parameters:
string   $newalbum:  the destination album


[ Top ]
deleteImage  [line 740]

  bool deleteImage( [bool $clean = true]  )

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.


[ Top ]
fileChanged  [line 181]

  bool fileChanged( )

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



[ Top ]
getAlbum  [line 525]

  object getAlbum( )

Returns the album that holds this image



[ Top ]
getAlbumName  [line 532]

  string getAlbumName( )

Retuns the folder name of the album that holds this image



[ Top ]
getCity  [line 588]

  string getCity( )

Returns the city field of the image



[ Top ]
getCommentCount  [line 912]

  int getCommentCount( )

Returns the count of comments for the image. Comments in moderation are not counted



[ Top ]
getComments  [line 867]

  array getComments( [bool $moderated = false], [bool $private = false], [bool $desc = false]  )

Returns an array of comments

Parameters:
bool   $moderated:  if false, comments in moderation are ignored
bool   $private:  if false ignores private comments
bool   $desc:  set to true for descending order


[ Top ]
getCommentsAllowed  [line 850]

  bool getCommentsAllowed( )

Retuns true if comments are allowed on the image



[ Top ]
getCopyright  [line 652]

  string getCopyright( )

Returns the copyright field of the image



[ Top ]
getCountry  [line 620]

  string getCountry( )

Returns the country field of the image



[ Top ]
getCredit  [line 636]

  string getCredit( )

Returns the credit field of the image



[ Top ]
getCustomData  [line 1137]

  string getCustomData( )

returns the custom data field



[ Top ]
getCustomImage  [line 984]

  string getCustomImage( int $size, int $width, int $height, int $cropw, int $croph, int $cropx, int $cropy, [bool $thumbStandin = false], [bool $gray = false], 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 true to inhibit watermarking
bool   $gray:  set true to force gray scale


Redefined in descendants as:

[ Top ]
getDateTime  [line 689]

  string getDateTime( )

Returns the unformatted date of the image



[ Top ]
getDefaultTitle  [line 163]

  void getDefaultTitle( )



[ Top ]
getDesc  [line 556]

  string getDesc( )

Returns the description of the image



[ Top ]
getFileName  [line 172]

  string getFileName( )

Returns the image filename



[ Top ]
getFullImage  [line 942]

  string getFullImage( )

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



[ Top ]
getHeight  [line 510]

  int getHeight( )

Returns the height of the image



[ Top ]
getImageFootprint  [line 1153]

  string getImageFootprint( )

Returns the disk size of the image



[ Top ]
getImageLink  [line 932]

  string getImageLink( )

Returns an image page link for the image



[ Top ]
getIndex  [line 1069]

  int getIndex( )

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



[ Top ]
getIPTCTag  [line 417]

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

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

  string getLocation( )

Returns the location field of the image



[ Top ]
getMetaData  [line 191]

  array getMetaData( )

Returns an array of EXIF data



[ Top ]
getNextImage  [line 1105]

  object getNextImage( )

Returns the next Image.



[ Top ]
getOwner  [line 1197]

  void getOwner( )

Owner functions



[ Top ]
getPrevImage  [line 1121]

  object getPrevImage( )

Return the previous Image



[ Top ]
getShow  [line 725]

  bool getShow( )

Returns true if the image is set visible



[ Top ]
getSizedImage  [line 952]

  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 ]
getSortOrder  [line 711]

  int getSortOrder( )

Returns the sort order value of the image



[ Top ]
getState  [line 604]

  string getState( )

Returns the state field of the image



[ Top ]
getTags  [line 668]

  string getTags( )

Returns the tags of the image



[ Top ]
getThumb  [line 1026]

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

Get a default-sized thumbnail of this image.

Parameters:
   $type: 


Redefined in descendants as:

[ Top ]
getThumbImageFile  [line 1013]

  s getThumbImageFile( [string $path = NULL]  )

Returns the image file name for the thumbnail image.

Parameters:
string   $path:  override path


Redefined in descendants as:

[ Top ]
getTitle  [line 539]

  string getTitle( )

Returns the title of this image



[ Top ]
getWatermark  [line 1162]

  string getWatermark( )

Returns the custom watermark name



[ Top ]
getWidth  [line 495]

  int getWidth( )

Returns the width of the image



[ Top ]
getWMUse  [line 1180]

  bool getWMUse( )

Returns the custom watermark usage



[ Top ]
moveImage  [line 761]

  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 ]
prepIPTCString  [line 452]

  string prepIPTCString( string $iptcstring, string $characterset  )

Returns the IPTC data converted into UTF8

Parameters:
string   $iptcstring:  the IPTC data
string   $characterset:  the internal encoding of the data


[ Top ]
renameImage  [line 805]

  bool renameImage( 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 597]

  void setCity( string $city  )

Stores the city field of the image

Parameters:
string   $city:  text for the city


[ Top ]
setCommentsAllowed  [line 857]

  void setCommentsAllowed( bool $commentson  )

Sets the comments allowed flag on the image

Parameters:
bool   $commentson:  true if they are allowed


[ Top ]
setCopyright  [line 661]

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

  void setCountry( string $country  )

Stores the country field of the image

Parameters:
string   $country:  text for the country filed


[ Top ]
setCredit  [line 645]

  void setCredit( string $credit  )

Stores the credit field of the image

Parameters:
string   $credit:  text for the credit field


[ Top ]
setCustomData  [line 1146]

  void setCustomData( string $val  )

Sets the custom data field

Parameters:
string   $val:  the value to be put in custom_data


[ Top ]
setDateTime  [line 696]

  void setDateTime( string $datetime  )

Stores the date of the image

Parameters:
string   $datetime:  the date


[ Top ]
setDesc  [line 565]

  void setDesc( string $desc  )

Stores the description of the image

Parameters:
string   $desc:  text for the description


[ Top ]
setLocation  [line 581]

  void setLocation( string $location  )

Stores the location field of the image

Parameters:
string   $location:  text for the location


[ Top ]
setOwner  [line 1200]

  void setOwner( $owner  )

Parameters:
   $owner: 


[ Top ]
setShow  [line 732]

  void setShow( bool $show  )

Sets the visibility of the image

Parameters:
bool   $show: 


[ Top ]
setSortOrder  [line 718]

  void setSortOrder( int $sortorder  )

Sets the sort order value of the image

Parameters:
int   $sortorder:  the order the images should appear in


[ Top ]
setState  [line 613]

  void setState( string $state  )

Stores the state field of the image

Parameters:
string   $state:  text for the state


[ Top ]
setTags  [line 677]

  void setTags( string $tags  )

Sets the tags of the image

Parameters:
string   $tags:  the tag list


[ Top ]
setTitle  [line 548]

  void setTitle( string $title  )

Stores the title of this image

Parameters:
string   $title:  text for the title


[ Top ]
setWatermark  [line 1171]

  void setWatermark( string $wm  )

Set custom watermark

Parameters:
string   $wm: 


[ Top ]
setWMUse  [line 1189]

  void setWMUse( $use $use  )

Sets the custom watermark usage

Parameters:
$use   $use: 


[ Top ]
updateDimensions  [line 467]

  void updateDimensions( )

Update this object's values for width and height.



Redefined in descendants as:

[ Top ]
updateMetaData  [line 206]

  void updateMetaData( )

Parses Exif/IPTC data



[ Top ]

Documentation generated on Mon, 09 Aug 2010 17:23:47 +0200 by phpDocumentor 1.4.1