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

Class: Image

Source Location: /class-image.php

Class Image

Descendants
Child Class Description
Video Video Class

[ Top ]
Property Summary
mixed   $album  
mixed   $commentcount  
mixed   $comments  
mixed   $exists  
mixed   $filemtime  
mixed   $filename  
mixed   $index  
mixed   $localpath  
mixed   $name  
mixed   $objectsThumb  
mixed   $sortorder  
mixed   $webpath  

[ Top ]
Method Summary
Image   Image()   Constructor for class-image
int   addComment()   Adds a comment to the image assumes data is coming straight from GET or POST
void   classSetup()  
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
array   getExifData()   Returns an array of EXIF data
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   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   getLocation()   Returns the location field of the image
object   getNextImage()   Returns the next Image.
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.
string   getTitle()   Returns the title of this image
int   getWidth()   Returns the width of the image
bool   moveImage()   Moves an image to a new album and/or filename (rename).
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   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   updateDimensions()   Update this object's values for width and height. Uses lazy evaluation.

[ Top ]
Properties
mixed   $album [line 14]

[ Top ]
mixed   $commentcount [line 16]

[ Top ]
mixed   $comments [line 15]

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

[ Top ]
mixed   $filemtime [line 19]

[ Top ]
mixed   $filename [line 9]

[ Top ]
mixed   $index [line 17]

[ Top ]
mixed   $localpath [line 12]

[ Top ]
mixed   $name [line 13]

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

[ Top ]
mixed   $sortorder [line 18]

[ Top ]
mixed   $webpath [line 11]

[ Top ]
Methods
Constructor Image  [line 33]

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

Constructor for class-image

Parameters:
object   &$album:  the owning album
sting   $filename:  the filename of the image


[ Top ]
addComment  [line 573]

  int 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 code for the success of the comment add: 0: Bad entry 1: Marked for moderation 2: Successfully posted

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

  void classSetup( &$album, $filename  )

Parameters:
   &$album: 
   $filename: 


[ Top ]
copyImage  [line 495]

  void copyImage( string $newalbum  )

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

Parameters:
string   $newalbum:  the destination album


[ Top ]
deleteImage  [line 445]

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

  bool fileChanged( )

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



[ Top ]
getAlbum  [line 224]

  object getAlbum( )

Returns the album that holds this image



[ Top ]
getAlbumName  [line 231]

  string getAlbumName( )

Retuns the folder name of the album that holds this image



[ Top ]
getCity  [line 290]

  string getCity( )

Returns the city field of the image



[ Top ]
getCommentCount  [line 583]

  int getCommentCount( )

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



[ Top ]
getComments  [line 535]

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

  bool getCommentsAllowed( )

Retuns true if comments are allowed on the image



[ Top ]
getCopyright  [line 358]

  string getCopyright( )

Returns the copyright field of the image



[ Top ]
getCountry  [line 324]

  string getCountry( )

Returns the country field of the image



[ Top ]
getCredit  [line 341]

  string getCredit( )

Returns the credit field of the image



[ Top ]
getCustomData  [line 760]

  string getCustomData( )

returns the custom data field



[ Top ]
getCustomImage  [line 650]

  string getCustomImage( int $size, int $width, int $height, int $cropw, int $croph, int $cropx, int $cropy, [bool $thumbStandin = 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


[ Top ]
getDateTime  [line 396]

  string getDateTime( )

Returns the unformatted date of the image



[ Top ]
getDefaultTitle  [line 120]

  void getDefaultTitle( )



[ Top ]
getDesc  [line 256]

  string getDesc( )

Returns the description of the image



[ Top ]
getExifData  [line 150]

  array getExifData( )

Returns an array of EXIF data



[ Top ]
getFileName  [line 131]

  string getFileName( )

Returns the image filename



[ Top ]
getFullImage  [line 613]

  string getFullImage( )

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



[ Top ]
getHeight  [line 214]

  int getHeight( )

Returns the height of the image



[ Top ]
getImageLink  [line 603]

  string getImageLink( )

Returns an image page link for the image



[ Top ]
getIndex  [line 692]

  int getIndex( )

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



[ Top ]
getLocation  [line 273]

  string getLocation( )

Returns the location field of the image



[ Top ]
getNextImage  [line 728]

  object getNextImage( )

Returns the next Image.



[ Top ]
getPrevImage  [line 744]

  object getPrevImage( )

Return the previous Image



[ Top ]
getShow  [line 430]

  bool getShow( )

Returns true if the image is set visible



[ Top ]
getSizedImage  [line 623]

  string getSizedImage( int $size  )

Returns a path to a sized version of the image

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


[ Top ]
getSortOrder  [line 416]

  int getSortOrder( )

Returns the sort order value of the image



[ Top ]
getState  [line 307]

  string getState( )

Returns the state field of the image



[ Top ]
getTags  [line 375]

  string getTags( )

Returns the tags of the image



[ Top ]
getThumb  [line 670]

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

Get a default-sized thumbnail of this image.

Parameters:
   $type: 


Redefined in descendants as:

[ Top ]
getTitle  [line 238]

  string getTitle( )

Returns the title of this image



[ Top ]
getWidth  [line 204]

  int getWidth( )

Returns the width of the image



[ Top ]
moveImage  [line 461]

  bool moveImage( Album $newalbum, [string $newfilename = null]  )

Moves an image to a new album and/or filename (rename).

Returns true on success and false 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 ]
renameImage  [line 486]

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

  void setCity( string $city  )

Stores the city field of the image

Parameters:
string   $city:  text for the city


[ Top ]
setCommentsAllowed  [line 525]

  void setCommentsAllowed( bool $commentson  )

Sets the comments allowed flag on the image

Parameters:
bool   $commentson:  true if they are allowed


[ Top ]
setCopyright  [line 368]

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

  void setCountry( string $country  )

Stores the country field of the image

Parameters:
string   $country:  text for the country filed


[ Top ]
setCredit  [line 351]

  void setCredit( string $credit  )

Stores the credit field of the image

Parameters:
string   $credit:  text for the credit field


[ Top ]
setCustomData  [line 770]

  void setCustomData( string $val  )

Sets the custom data field

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


[ Top ]
setDateTime  [line 403]

  void setDateTime( string $datetime  )

Stores the date of the image

Parameters:
string   $datetime:  the date


[ Top ]
setDesc  [line 266]

  void setDesc( string $desc  )

Stores the description of the image

Parameters:
string   $desc:  text for the description


[ Top ]
setLocation  [line 283]

  void setLocation( string $location  )

Stores the location field of the image

Parameters:
string   $location:  text for the location


[ Top ]
setShow  [line 437]

  void setShow( bool $show  )

Sets the visibility of the image

Parameters:
bool   $show: 


[ Top ]
setSortOrder  [line 423]

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

  void setState( string $state  )

Stores the state field of the image

Parameters:
string   $state:  text for the state


[ Top ]
setTags  [line 384]

  void setTags( string $tags  )

Sets the tags of the image

Parameters:
string   $tags:  the tag string


[ Top ]
setTitle  [line 248]

  void setTitle( string $title  )

Stores the title of this image

Parameters:
string   $title:  text for the title


[ Top ]
updateDimensions  [line 186]

  void updateDimensions( )

Update this object's values for width and height. Uses lazy evaluation.



Redefined in descendants as:

[ Top ]

Documentation generated on Tue, 30 Sep 2008 20:23:16 +0200 by phpDocumentor 1.4.1