Class Ansel_Gallery_Date

Description

A wrapper/decorator around an Ansel_Gallery to allow multiple date groupings to access the same Ansel_Gallery instance. This is not a full Ansel_Gallery implementation.

TODO: For PHP5, this should be rewritten to get rid of all these gosh-darn pass through functions.

Located in /lib/GalleryMode/Date.php (line 665)


	
			
Variable Summary
 mixed $id
 mixed $_gallery
 mixed $_images
 Ansel_Gallery_Mode $_modeHelper
Method Summary
 Ansel_Gallery_Date Ansel_Gallery_Date ( &$gallery, [array $images = array()], Ansel_Gallery $gallery)
 boolean canDownload ()
 integer copyImagesTo (array $images, Ansel_Gallery $gallery)
 mixed countChildren ([integer $perm = PERMS_SHOW], [boolean $allLevels = true])
 integer countGalleryChildren ([integer $perm = PERMS_SHOW], [boolean $galleries_only = false], [ $noauto = true])
 integer countImages ([boolean $subgalleries = false])
 void get ( $attribute)
 mixed getChildren ([int $perm = PERMS_SHOW], [boolean $allLevels = true])
 void getDate ()
 mixed getDefaultImage ([string $style = null])
 A getGalleryChildren ([integer $perm = PERMS_SHOW], [integer $from = 0], [integer $to = 0], [ $noauto = false])
 Ansel_Image &getImage (integer $id)
 void getImages ([integer $from = 0], [integer $count = 0], mixed 2)
 Identity getOwner ()
 mixed getParent ()
 array() getParents ()
 mixed getRecentImages ([integer $limit = 10])
 array getStyle ()
 void getTags ()
 void getTile ([Ansel_Gallery $parent = null], [string $style = null], [boolean $mini = false], [array $params = array()])
 boolean hasPermission (string $userid, integer $permission, [string $creator = null])
 void hasSubGalleries ()
 boolean isOldEnough ()
 mixed listImages ([integer $from = 0], [integer $count = 0])
 boolean removeImage (mixed $image, [ $isStack = false])
 void setDate ( $date)
 void setImageOrder (integer $imageId, integer $pos)
 void setTags (array $tags)
 string _getViewHash (string $view, [string $style = null])
 Ansel_Gallery_Mode _setModeHelper ()
Variables
mixed $id (line 668)
mixed $_gallery (line 678)
mixed $_images (line 681)
Ansel_Gallery_Mode $_modeHelper (line 675)

The gallery mode helper

  • var: object
Methods
Constructor Ansel_Gallery_Date (line 690)

The Ansel_Gallery_Date constructor.

Ansel_Gallery_Date Ansel_Gallery_Date ( &$gallery, [array $images = array()], Ansel_Gallery $gallery)
  • Ansel_Gallery $gallery: The gallery we are decorating.
  • array $images: An array of image ids that this grouping contains.
  • &$gallery
canDownload (line 717)

Checks if the user can download the full photo

  • return: Whether or not user can download full photos
boolean canDownload ()
copyImagesTo (line 730)

Copy image and related data to specified gallery.

  • return: | PEAR_Error The number of images copied or error message
integer copyImagesTo (array $images, Ansel_Gallery $gallery)
  • array $images: An array of image ids.
  • Ansel_Gallery $gallery: The gallery to copy images to.
countChildren (line 991)

Return a count of the number of children this share has

  • return: The number of child shares || PEAR_Error
mixed countChildren ([integer $perm = PERMS_SHOW], [boolean $allLevels = true])
  • integer $perm: A PERMS_* constant
  • boolean $allLevels: Count grandchildren or just children
countGalleryChildren (line 815)

Return the count this gallery's children

  • return: The count of this gallery's children.
integer countGalleryChildren ([integer $perm = PERMS_SHOW], [boolean $galleries_only = false], [ $noauto = true])
  • integer $perm: The permissions to require.
  • boolean $galleries_only: Only include galleries, no images.
  • $noauto
countImages (line 891)

Returns the number of images in this gallery and, optionally, all sub-galleries.

  • return: number of images in this gallery
integer countImages ([boolean $subgalleries = false])
  • boolean $subgalleries: Determines whether subgalleries should be counted or not.
get (line 1031)
void get ( $attribute)
  • $attribute
getChildren (line 1005)

Get all children of this share.

  • return: An array of Horde_Share_Object objects || PEAR_Error
mixed getChildren ([int $perm = PERMS_SHOW], [boolean $allLevels = true])
  • int $perm: PERMS_* constant. If NULL will return all shares regardless of permissions.
  • boolean $allLevels: Return all levels.
getDate (line 1036)
void getDate ()
getDefaultImage (line 906)

Returns the default image for this gallery.

  • return: The image_id of the default image or false.
mixed getDefaultImage ([string $style = null])
  • string $style: Force the use of this style, if it's available otherwise use whatever style is choosen for this gallery. If prettythumbs are not available then we always use ansel_default style.
getGalleryChildren (line 801)

Get the children of this gallery.

  • return: mixed array of Ansel_Gallery and Ansel_Image objects that are children of this gallery.
A getGalleryChildren ([integer $perm = PERMS_SHOW], [integer $from = 0], [integer $to = 0], [ $noauto = false])
  • integer $perm: The permissions to limit to.
  • integer $from: The child to start at.
  • integer $to: The child to end with.
  • $noauto
getImage (line 869)

Returns the image in this gallery corresponding to the given id.

  • return: The image object corresponding to the given id.
Ansel_Image &getImage (integer $id)
  • integer $id: The ID of the image to retrieve.
getImages (line 844)

Gets a slice of the images in this gallery.

void getImages ([integer $from = 0], [integer $count = 0], mixed 2)
  • integer $from: The image to start fetching.
  • integer $count: The numer of images to return.
  • mixed 2: An array of Ansel_Image objects | PEAR_Error
getOwner (line 764)

Returns this share's owner's Identity object.

  • return: object for the owner of this gallery.
Identity getOwner ()
getParent (line 1015)

Returns a child's direct parent

  • return: The direct parent Horde_Share_Object or PEAR_Error
mixed getParent ()
getParents (line 1025)

Get all of this share's parents.

  • return: An array of Horde_Share_Objects
array() getParents ()
getRecentImages (line 856)

Return the most recently added images in this gallery.

  • return: An array of Ansel_Image objects | PEAR_Error
mixed getRecentImages ([integer $limit = 10])
  • integer $limit: The maximum number of images to return.
getStyle (line 941)

Return the style definition for this gallery. Returns the first available style in this order: Explicitly configured style if available, if configured style is not available, use ansel_default. If nothing has been configured, the user's selected default is attempted.

  • return: The style definition array.
array getStyle ()
getTags (line 918)

Returns this gallery's tags.

void getTags ()
getTile (line 778)

Output the HTML for this gallery's tile.

void getTile ([Ansel_Gallery $parent = null], [string $style = null], [boolean $mini = false], [array $params = array()])
  • Ansel_Gallery $parent: The parent Ansel_Gallery object
  • string $style: A named gallery style to use.
  • boolean $mini: Force the use of a mini thumbnail?
  • array $params: Any additional parameters the Ansel_Tile object may need.
hasPermission (line 968)

Checks to see if a user has a given permission.

  • return: Whether or not $userid has $permission.
boolean hasPermission (string $userid, integer $permission, [string $creator = null])
  • string $userid: The userid of the user.
  • integer $permission: A PERMS_* constant to test for.
  • string $creator: The creator of the event.
hasSubGalleries (line 877)

Checks if the gallery has any subgallery

void hasSubGalleries ()
isOldEnough (line 978)

Check user age limtation

boolean isOldEnough ()
listImages (line 831)

Lists a slice of the image ids in this gallery.

  • return: An array of image_ids | PEAR_Error
mixed listImages ([integer $from = 0], [integer $count = 0])
  • integer $from: The image to start listing.
  • integer $count: The numer of images to list.
removeImage (line 754)

Remove the given image from this gallery.

  • return: True on success, false on failure.
boolean removeImage (mixed $image, [ $isStack = false])
  • mixed $image: Image to delete. Can be an Ansel_Image or an image ID.
  • $isStack
setDate (line 1041)
void setDate ( $date)
  • $date
setImageOrder (line 741)

Set the order of an image in this gallery.

void setImageOrder (integer $imageId, integer $pos)
  • integer $imageId: The image to sort.
  • integer $pos: The sort position of the image.
setTags (line 928)

Set/replace this gallery's tags.

void setTags (array $tags)
  • array $tags: AN array of tag names to associate with this image.
_getViewHash (line 954)

Return a hash key for the given view and style.

  • return: A md5 hash suitable for use as a key.
string _getViewHash (string $view, [string $style = null])
  • string $view: The view (thumb, prettythumb etc...)
  • string $style: The named style.
_setModeHelper (line 706)

Sets a new GalleryMode helper for this decorated gallery. The client code (Ansel_GalleryMode_Date) needs to call the setDate() method on the new GalleryMode_Date object before it's used.

  • return: object
Ansel_Gallery_Mode _setModeHelper ()

Documentation generated on Sun, 30 Jan 2011 05:08:45 +0000 by phpDocumentor 1.4.3