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

Class: Album

Source Location: /class-album.php

Class Album

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   $albumthumbnail  
mixed   $dynamic  
mixed   $exists  
mixed   $gallery  
mixed   $images  
mixed   $index  
mixed   $lastimagesort  
mixed   $lastsubalbumsort  
mixed   $localpath  
mixed   $manage_rights  
mixed   $manage_some_rights  
mixed   $name  
mixed   $parent  
mixed   $parentalbum  
mixed   $searchengine  
mixed   $sidecars  
mixed   $subalbums  
mixed   $subrights  
mixed   $view_rights  

[ Top ]
Method Summary
Album   __construct()   Constructor for albums
void   albumSubRights()   returns the mitigated album rights.
void   checkforGuest()   Checks if guest is loggedin for the album
int   copy()   Copy this album to the location specified by $newfolder, copying all metadata, subalbums, and subalbums' metadata with it.
void   garbageCollect()   For every image in the album, look for its file. Delete from the database if the file does not exist. Same for each sub-directory/album.
int   getAlbumID()   Returns the id of this album in the db
string   getAlbumLink()   Returns an URL to the album, including the current page number
array   getAlbums()   Returns all folder names for all the subdirectories.
string   getAlbumSortKey()   Returns the DB key associated with the subalbum sort type
string   getAlbumSortType()   Returns the sort type for subalbums in this album.
string   getAlbumTheme()   Returns the theme for the album
string   getAlbumThumb()   Gets the thumbnail URL for the album thumbnail image as returned by $this->getAlbumThumbImage();
Image   getAlbumThumbImage()   Gets the album's set thumbnail image from the database if one exists, otherwise, finds the first image in the album or sub-album and returns it as an Image object.
string   getFolder()   Returns the folder on the filesystem
int   getGalleryPage()   Returns the page number in the gallery of this album
int   getImage()   Returns an image from the album based on the index passed.
array   getImages()   Returns a of a slice of the images for this album. They will also be sorted according to the sort type of this album, or by filename if none has been set.
string   getImageSortKey()   Returns the DB key associated with the image sort type
string   getLocation()   Returns the place data of an album
object   getNextAlbum()   Returns the album following the current album
int   getNumAlbums()   Returns the count of subalbums
int   getNumImages()   Returns the number of images in this album (not counting its subalbums)
void   getOwner()   Owner functions
object   getParent()   Returns The parent Album of this Album. NULL if this is a top-level album.
object   getPrevAlbum()   Returns the album prior to the current album
object   getSearchEngine()   Returns the search engine for a dynamic album
string   getSearchParams()   Returns the search parameters for a dynamic album
string   getSortDirection()   Returns either the subalbum sort direction or the image sort direction of the album
string   getSortType()   Returns the sort type of the album images Will return a parent sort type if the sort type for this album is empty
void   getUpdatedDate()  
string   getWatermark()   returns the album watermark
bool   getWatermarkThumb()   Returns the album watermark thumb
bool   isDynamic()   Returns true if the album is "dynamic"
void   isMyItem()   checks access to the album
void   isProtected()   returns true if there is any protection on the album
int   moveAlbum()   Move this album to the location specified by $newfolder, copying all metadata, subalbums, and subalbums' metadata with it.
void   preLoad()   Simply creates objects of all the images and sub-albums in this album to load accurate values into the database.
bool   remove()   Delete the entire album PERMANENTLY. Be careful! This is unrecoverable.
boolean   rename()   Rename this album folder. Alias for moveAlbum($newfoldername);
void   setAlbumTheme()   Sets the theme of the album
void   setAlbumThumb()   Stores the thumbnail path for an album thumg
bool   setDefaults()   Sets default values for a new album
void   setLocation()   Stores the album place
void   setOwner()  
void   setSearchParams()   Sets the search parameters of a dynamic album
void   setSortDirection()   sets sort directions for the album
void   setSortType()   Stores the sort type for the album
void   setSubalbumSortType()   Stores the subalbum sort type for this abum
void   setUpdatedDate()  
void   setWatermark()   Sets the album watermark
void   setWatermarkThumb()   Sets the custom watermark usage
array   sortImageArray()   sortImageArray will sort an array of Images based on the given key. The key must be one of (filename, title, sort_order) at the moment.

[ Top ]
Properties
mixed   $albumthumbnail = NULL [line 30]
API Tags:
Access:  protected


[ Top ]
mixed   $dynamic = false [line 32]
API Tags:
Access:  protected


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

[ Top ]
mixed   $gallery [line 20]

[ Top ]
mixed   $images = null [line 17]

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


[ Top ]
mixed   $lastimagesort = NULL [line 28]
API Tags:
Access:  protected


[ Top ]
mixed   $lastsubalbumsort = NULL [line 29]
API Tags:
Access:  protected


[ Top ]
mixed   $localpath [line 15]

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

Redefinition of:
ThemeObject::$manage_rights

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

Redefinition of:
ThemeObject::$manage_some_rights

[ Top ]
mixed   $name [line 14]

[ Top ]
mixed   $parent = null [line 18]

[ Top ]
mixed   $parentalbum = null [line 19]

[ Top ]
mixed   $searchengine [line 21]

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

[ Top ]
mixed   $subalbums = null [line 26]
API Tags:
Access:  protected


[ Top ]
mixed   $subrights = NULL [line 31]
API Tags:
Access:  protected


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

Redefinition of:
ThemeObject::$view_rights

[ Top ]
Methods
Constructor __construct  [line 43]

  Album __construct( object &$gallery, string $folder8, [bool $cache = true], [ $quiet = false]  )

Constructor for albums

Parameters:
object   &$gallery:  The parent gallery
string   $folder8:  folder name (UTF8) of the album
bool   $cache:  load from cache if present
   $quiet: 


Redefinition of:
MediaObject::__construct()
Class instantiator

[ Top ]
albumSubRights  [line 1207]

  void albumSubRights( )

returns the mitigated album rights.

returns NULL if not a managed album



[ Top ]
checkforGuest  [line 1282]

  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 ]
copy  [line 884]

  int copy( $newfolder $newfolder  )

Copy this album to the location specified by $newfolder, copying all metadata, subalbums, and subalbums' metadata with it.

Parameters:
$newfolder   $newfolder:  string the folder to copy to, including the name of the current folder (possibly renamed).

API Tags:
Return:  0 on success and error indicator on failure.


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 ]
garbageCollect  [line 962]

  void garbageCollect( [bool $deep = false]  )

For every image in the album, look for its file. Delete from the database if the file does not exist. Same for each sub-directory/album.

Parameters:
bool   $deep:  set to true for a thorough cleansing


[ Top ]
getAlbumID  [line 167]

  int getAlbumID( )

Returns the id of this album in the db



[ Top ]
getAlbumLink  [line 661]

  string getAlbumLink( )

Returns an URL to the album, including the current page number



[ Top ]
getAlbums  [line 343]

  array getAlbums( [string $page = 0], [string $sorttype = null], [string $sortdirection = null], [bool $care = true], [bool $mine = NULL]  )

Returns all folder names for all the subdirectories.

Parameters:
string   $page:  Which page of subalbums to display.
string   $sorttype:  The sort strategy
string   $sortdirection:  The direction of the sort
bool   $care:  set to false if the order does not matter
bool   $mine:  set true/false to override ownership


[ Top ]
getAlbumSortKey  [line 326]

  string getAlbumSortKey( [string $sorttype = null]  )

Returns the DB key associated with the subalbum sort type

Parameters:
string   $sorttype:  subalbum sort type


[ Top ]
getAlbumSortType  [line 289]

  string getAlbumSortType( )

Returns the sort type for subalbums in this album.

Will return a parent sort type if the sort type for this album is empty.



[ Top ]
getAlbumTheme  [line 1156]

  string getAlbumTheme( )

Returns the theme for the album



[ Top ]
getAlbumThumb  [line 644]

  string getAlbumThumb( )

Gets the thumbnail URL for the album thumbnail image as returned by $this->getAlbumThumbImage();



[ Top ]
getAlbumThumbImage  [line 536]

  Image getAlbumThumbImage( )

Gets the album's set thumbnail image from the database if one exists, otherwise, finds the first image in the album or sub-album and returns it as an Image object.



[ Top ]
getFolder  [line 160]

  string getFolder( )

Returns the folder on the filesystem



[ Top ]
getGalleryPage  [line 713]

  int getGalleryPage( )

Returns the page number in the gallery of this album



[ Top ]
getImage  [line 516]

  int getImage( int $index  )

Returns an image from the album based on the index passed.

Parameters:
int   $index: 


[ Top ]
getImages  [line 392]

  array getImages( [string $page = 0], [int $firstPageCount = 0], [string $sorttype = null], [string $sortdirection = null], [bool $care = true], [bool $mine = NULL]  )

Returns a of a slice of the images for this album. They will also be sorted according to the sort type of this album, or by filename if none has been set.

Parameters:
string   $page:  Which page of images should be returned. If zero, all images are returned.
int   $firstPageCount:  count of images that go on the album/image transition page
string   $sorttype:  optional sort type
string   $sortdirection:  optional sort direction
bool   $care:  set to false if the order of the images does not matter
bool   $mine:  set true/false to override ownership


[ Top ]
getImageSortKey  [line 315]

  string getImageSortKey( [string $sorttype = null]  )

Returns the DB key associated with the image sort type

Parameters:
string   $sorttype:  the sort type


[ Top ]
getLocation  [line 196]

  string getLocation( )

Returns the place data of an album



[ Top ]
getNextAlbum  [line 677]

  object getNextAlbum( )

Returns the album following the current album



[ Top ]
getNumAlbums  [line 374]

  int getNumAlbums( )

Returns the count of subalbums



[ Top ]
getNumImages  [line 503]

  int getNumImages( )

Returns the number of images in this album (not counting its subalbums)



[ Top ]
getOwner  [line 1300]

  void getOwner( )

Owner functions



[ Top ]
getParent  [line 174]

  object getParent( )

Returns The parent Album of this Album. NULL if this is a top-level album.



[ Top ]
getPrevAlbum  [line 695]

  object getPrevAlbum( )

Returns the album prior to the current album



[ Top ]
getSearchEngine  [line 1141]

  object getSearchEngine( )

Returns the search engine for a dynamic album



[ Top ]
getSearchParams  [line 1123]

  string getSearchParams( )

Returns the search parameters for a dynamic album



[ Top ]
getSortDirection  [line 216]

  string getSortDirection( string $what  )

Returns either the subalbum sort direction or the image sort direction of the album

Parameters:
string   $what:  'image_sortdirection' if you want the image direction, 'album_sortdirection' if you want it for the album


[ Top ]
getSortType  [line 260]

  string getSortType( )

Returns the sort type of the album images Will return a parent sort type if the sort type for this album is empty



[ Top ]
getUpdatedDate  [line 1317]

  void getUpdatedDate( )



[ Top ]
getWatermark  [line 1172]

  string getWatermark( )

returns the album watermark



[ Top ]
getWatermarkThumb  [line 1189]

  bool getWatermarkThumb( )

Returns the album watermark thumb



[ Top ]
isDynamic  [line 1114]

  bool isDynamic( )

Returns true if the album is "dynamic"



[ Top ]
isMyItem  [line 1247]

  void isMyItem( bit $action  )

checks access to the album

Parameters:
bit   $action: 

What the requestor wants to do

returns true of access is allowed



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

[ Top ]
isProtected  [line 1293]

  void isProtected( )

returns true if there is any protection on the album



[ Top ]
moveAlbum  [line 796]

  int moveAlbum( $newfolder $newfolder  )

Move this album to the location specified by $newfolder, copying all metadata, subalbums, and subalbums' metadata with it.

Parameters:
$newfolder   $newfolder:  string the folder to move to, including the name of the current folder (possibly renamed).

API Tags:
Return:  0 on success and error indicator on failure.


[ Top ]
preLoad  [line 1034]

  void preLoad( )

Simply creates objects of all the images and sub-albums in this album to load accurate values into the database.



[ Top ]
remove  [line 743]

  bool remove( )

Delete the entire album PERMANENTLY. Be careful! This is unrecoverable.

Returns true if successful



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

[ Top ]
rename  [line 873]

  boolean rename( string $newfolder  )

Rename this album folder. Alias for moveAlbum($newfoldername);

Parameters:
string   $newfolder:  the new folder name of this album (including subalbum paths)

API Tags:
Return:  true on success or false on failure.


[ Top ]
setAlbumTheme  [line 1164]

  void setAlbumTheme( string $theme  )

Sets the theme of the album

Parameters:
string   $theme: 


[ Top ]
setAlbumThumb  [line 654]

  void setAlbumThumb( string $filename  )

Stores the thumbnail path for an album thumg

Parameters:
string   $filename:  thumbnail path


[ Top ]
setDefaults  [line 138]

  bool setDefaults( )

Sets default values for a new album


API Tags:
Access:  protected


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

[ Top ]
setLocation  [line 205]

  void setLocation( string $place  )

Stores the album place

Parameters:
string   $place:  text for the place field


[ Top ]
setOwner  [line 1313]

  void setOwner( $owner  )

Parameters:
   $owner: 


[ Top ]
setSearchParams  [line 1132]

  void setSearchParams( string $params  )

Sets the search parameters of a dynamic album

Parameters:
string   $params:  The search string to produce the dynamic album


[ Top ]
setSortDirection  [line 246]

  void setSortDirection( string $what, string $val  )

sets sort directions for the album

Parameters:
string   $what:  'image_sortdirection' if you want the image direction, 'album_sortdirection' if you want it for the album
string   $val:  the direction


[ Top ]
setSortType  [line 278]

  void setSortType( string $sorttype  )

Stores the sort type for the album

Parameters:
string   $sorttype:  the album sort type


[ Top ]
setSubalbumSortType  [line 307]

  void setSubalbumSortType( string $sorttype  )

Stores the subalbum sort type for this abum

Parameters:
string   $sorttype:  the subalbum sort type


[ Top ]
setUpdatedDate  [line 1321]

  void setUpdatedDate( $date  )

Parameters:
   $date: 


[ Top ]
setWatermark  [line 1180]

  void setWatermark( string $wm  )

Sets the album watermark

Parameters:
string   $wm: 


[ Top ]
setWatermarkThumb  [line 1198]

  void setWatermarkThumb( $wm $wm  )

Sets the custom watermark usage

Parameters:
$wm   $wm: 


[ Top ]
sortImageArray  [line 441]

  array sortImageArray( array $images, string $sorttype, string $sortdirection, [bool $mine = NULL]  )

sortImageArray will sort an array of Images based on the given key. The key must be one of (filename, title, sort_order) at the moment.

Parameters:
array   $images:  The array of filenames to be sorted.
string   $sorttype:  optional sort type
string   $sortdirection:  optional sort direction
bool   $mine:  set to true/false to override ownership clause

API Tags:
Access:  protected


[ Top ]

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