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

Class: AlbumBase

Source Location: /class-album.php

Class AlbumBase

Descendants
Child Class Description
Album Root class for images and albums
dynamicAlbum Root class for images and albums
favorites This is the class declaration

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

[ Top ]
Method Summary
AlbumBase   __construct()  
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.
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   getFileName()   Returns the folder on the filesystem
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   getLink()   Returns an URL to the album, including the current page number
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.
void   getParentID()  
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
string   getThumb()   Gets the thumbnail URL for the album thumbnail image as returned by $this->getAlbumThumbImage();
void   getUpdatedDate()   Date at which the album last discovered an image
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
array   loadFileNames()   Load all of the filenames that are found in this Albums directory on disk.
int   move()   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 move($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   setThumb()   Stores the thumbnail path for an album thumg
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.
void   succeed()  
void   updateParent()   changes the parent of an album for move/copy
int   _move()   common album move code

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


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

Redefinition of:
PersistentObject::$exists

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

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


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


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


[ Top ]
mixed   $linkname [line 50]

[ Top ]
mixed   $localpath [line 51]

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

Redefinition of:
ThemeObject::$manage_rights

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

Redefinition of:
ThemeObject::$manage_some_rights

[ Top ]
mixed   $name [line 49]

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

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

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

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


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


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

Redefinition of:
ThemeObject::$view_rights

[ Top ]
Methods
Constructor __construct  [line 67]

  AlbumBase __construct( $folder8, [ $cache = true]  )

Parameters:
   $folder8: 
   $cache: 


Redefinition of:
MediaObject::__construct()
Class instantiator

Redefined in descendants as:

[ Top ]
albumSubRights  [line 970]

  void albumSubRights( )

returns the mitigated album rights.

returns NULL if not a managed album



[ Top ]
checkforGuest  [line 865]

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

  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.

Redefined in descendants as:
  • Album::copy() : Copy this album to the location specified by $newfolder, copying all metadata, subalbums, and subalbums' metadata with it.
  • dynamicAlbum::copy() : Copy this album to the location specified by $newfolder, copying all metadata, subalbums, and subalbums' metadata with it.

[ Top ]
garbageCollect  [line 773]

  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


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

[ Top ]
getAlbumLink  [line 577]

  string getAlbumLink( [string $page = NULL]  )

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

Parameters:
string   $page:  if not null, apppend as page #

API Tags:
Deprecated:  since version 1.4.6


[ Top ]
getAlbums  [line 324]

  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


Redefined in descendants as:

[ Top ]
getAlbumSortKey  [line 307]

  string getAlbumSortKey( [string $sorttype = null]  )

Returns the DB key associated with the subalbum sort type

Parameters:
string   $sorttype:  subalbum sort type


[ Top ]
getAlbumSortType  [line 272]

  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.


API Tags:
Deprecated:  since version 1.4.5


[ Top ]
getAlbumTheme  [line 919]

  string getAlbumTheme( )

Returns the theme for the album



[ Top ]
getAlbumThumb  [line 545]

  string getAlbumThumb( )

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


API Tags:
Deprecated:  since version 1.4.6


[ Top ]
getAlbumThumbImage  [line 411]

  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 ]
getFileName  [line 107]

  string getFileName( )

Returns the folder on the filesystem



[ Top ]
getFolder  [line 116]

  string getFolder( )

Returns the folder on the filesystem



[ Top ]
getGalleryPage  [line 1156]

  int getGalleryPage( )

Returns the page number in the gallery of this album



[ Top ]
getImage  [line 396]

  int getImage( int $index  )

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

Parameters:
int   $index: 


[ Top ]
getImages  [line 356]

  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


Redefined in descendants as:
  • Album::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.
  • dynamicAlbum::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.
  • favorites::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.

[ Top ]
getImageSortKey  [line 294]

  string getImageSortKey( [string $sorttype = null]  )

Returns the DB key associated with the image sort type

Parameters:
string   $sorttype:  the sort type


[ Top ]
getLink  [line 588]

  string getLink( [string $page = NULL]  )

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

Parameters:
string   $page:  if not null, apppend as page #


Redefined in descendants as:

[ Top ]
getLocation  [line 150]

  string getLocation( [ $locale = NULL]  )

Returns the place data of an album

Parameters:
   $locale: 


[ Top ]
getNextAlbum  [line 1118]

  object getNextAlbum( )

Returns the album following the current album



[ Top ]
getNumAlbums  [line 338]

  int getNumAlbums( )

Returns the count of subalbums



[ Top ]
getNumImages  [line 383]

  int getNumImages( )

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



[ Top ]
getOwner  [line 883]

  void getOwner( )

Owner functions



[ Top ]
getParent  [line 125]

  object getParent( )

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



[ Top ]
getParentID  [line 141]

  void getParentID( )



Redefinition of:
ThemeObject::getParentID()
Returns the partent id

[ Top ]
getPrevAlbum  [line 1137]

  object getPrevAlbum( )

Returns the album prior to the current album



[ Top ]
getSearchEngine  [line 820]

  object getSearchEngine( )

Returns the search engine for a dynamic album



Redefined in descendants as:

[ Top ]
getSearchParams  [line 802]

  string getSearchParams( )

Returns the search parameters for a dynamic album



Redefined in descendants as:

[ Top ]
getSortDirection  [line 176]

  string getSortDirection( [string $what = 'image']  )

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

  string getSortType( [ $what = 'image']  )

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

Parameters:
   $what: 


[ Top ]
getThumb  [line 535]

  string getThumb( )

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



[ Top ]
getUpdatedDate  [line 906]

  void getUpdatedDate( )

Date at which the album last discovered an image



[ Top ]
getWatermark  [line 936]

  string getWatermark( )

returns the album watermark



[ Top ]
getWatermarkThumb  [line 953]

  bool getWatermarkThumb( )

Returns the album watermark thumb



[ Top ]
isDynamic  [line 793]

  bool isDynamic( )

Returns true if the album is "dynamic"



Redefined in descendants as:

[ Top ]
isMyItem  [line 830]

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

  void isProtected( )

returns true if there is any protection on the album



[ Top ]
loadFileNames  [line 784]

  array loadFileNames( [$dirs $dirs = false]  )

Load all of the filenames that are found in this Albums directory on disk.

Returns an array with all the names.

Parameters:
$dirs   $dirs:  Whether or not to return directories ONLY with the file array.

API Tags:
Access:  protected


Redefined in descendants as:

[ Top ]
move  [line 694]

  int move( $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.


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

Redefined in descendants as:
  • Album::move() : Move this album to the location specified by $newfolder, copying all metadata, subalbums, and subalbums' metadata with it.
  • dynamicAlbum::move() : Move this album to the location specified by $newfolder, copying all metadata, subalbums, and subalbums' metadata with it.

[ Top ]
preLoad  [line 1104]

  void preLoad( )

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



Redefined in descendants as:
  • dynamicAlbum::preLoad() : Simply creates objects of all the images and sub-albums in this album to load accurate values into the database.

[ Top ]
remove  [line 609]

  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

Redefined in descendants as:
  • Album::remove() : Delete the entire album PERMANENTLY. Be careful! This is unrecoverable.
  • dynamicAlbum::remove() : Delete the entire album PERMANENTLY. Be careful! This is unrecoverable.

[ Top ]
rename  [line 703]

  boolean rename( string $newfolder  )

Rename this album folder. Alias for move($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 928]

  void setAlbumTheme( string $theme  )

Sets the theme of the album

Parameters:
string   $theme: 


[ Top ]
setAlbumThumb  [line 565]

  void setAlbumThumb( string $filename  )

Stores the thumbnail path for an album thumg

Parameters:
string   $filename:  thumbnail path

API Tags:
Deprecated:  since version 1.4.6


[ Top ]
setDefaults  [line 78]

  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.

Redefined in descendants as:

[ Top ]
setLocation  [line 164]

  void setLocation( string $place  )

Stores the album place

Parameters:
string   $place:  text for the place field


[ Top ]
setOwner  [line 898]

  void setOwner( $owner  )

Parameters:
   $owner: 


[ Top ]
setSearchParams  [line 811]

  void setSearchParams( string $params  )

Sets the search parameters of a dynamic album

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


Redefined in descendants as:

[ Top ]
setSortDirection  [line 236]

  void setSortDirection( bool $val, [string $what = 'image']  )

sets sort directions for the album

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


[ Top ]
setSortType  [line 256]

  void setSortType( string $sorttype, [string $what = 'image']  )

Stores the sort type for the album

Parameters:
string   $sorttype:  the album sort type
string   $what:  'Description'image' or 'album'


[ Top ]
setSubalbumSortType  [line 283]

  void setSubalbumSortType( string $sorttype  )

Stores the subalbum sort type for this abum

Parameters:
string   $sorttype:  the subalbum sort type

API Tags:
Deprecated:  since version 1.4.5


[ Top ]
setThumb  [line 555]

  void setThumb( string $filename  )

Stores the thumbnail path for an album thumg

Parameters:
string   $filename:  thumbnail path


[ Top ]
setUpdatedDate  [line 910]

  void setUpdatedDate( $date  )

Parameters:
   $date: 


[ Top ]
setWatermark  [line 944]

  void setWatermark( string $wm  )

Sets the album watermark

Parameters:
string   $wm: 


[ Top ]
setWatermarkThumb  [line 962]

  void setWatermarkThumb( $wm $wm  )

Sets the custom watermark usage

Parameters:
$wm   $wm: 


[ Top ]
sortImageArray  [line 1019]

  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 ]
succeed  [line 707]

  void succeed( $dest  )

Parameters:
   $dest: 

API Tags:
Access:  protected


Redefined in descendants as:

[ Top ]
updateParent  [line 1086]

  void updateParent( string $newfolder  )

changes the parent of an album for move/copy

Parameters:
string   $newfolder:  The folder name of the new parent

API Tags:
Access:  protected


[ Top ]
_move  [line 632]

  int _move( type $newfolder  )

common album move code

Parameters:
type   $newfolder: 

API Tags:
Access:  protected


[ Top ]

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