Class Ansel

Description

Ansel Base Class.

Located in /lib/Ansel.php (line 24)


	
			
Method Summary
 void attachStylesheet (string $stylesheet, [boolean $link = false])
 void downloadImagesAsZip ([ $gallery = null], [unknown_type $images = array()])
 void getBreadCrumbs ([ $separator = ' » '], [ $gallery = null])
 A getDateParameter ([array $date = array()])
 mixed &getDb ()
 string getErrorImage ([string $view = 'screen'])
 array getImageFromFile (string $file, [array $override = array()])
 Horde_Image getImageObject ([array $params = array()])
 string getImageUrl (string $imageId, [string $view = 'screen'], [boolean $full = false], [string $style = null])
 void getMenu ([ $returnType = 'object'])
 array getStyleDefinition (string $style)
 string getStyleSelect (string $element_name, [string $selected = ''])
 void getUrlFor (string $controller, array $data, [boolean $full = false], [integer $append_session = 0], string 4)
 VFS &getVFS ()
 boolean isAvailable (string $feature)
 string selectGalleries ([array $selected = null], [integer $perm = PERMS_SHOW], [mixed $attributes = null], [string $parent = null], [ $allLevels = true], [integer $from = 0], [integer $count = 0], [integer $ignore = null])
 void stylesheetLinks ([boolean $custom_only = false])
Methods
attachStylesheet (line 897)

Add a custom stylesheet to the current page

void attachStylesheet (string $stylesheet, [boolean $link = false])
  • string $stylesheet: The stylesheet to add. A path relative to $themesfs
  • boolean $link: Immediately output the CSS link
downloadImagesAsZip (line 965)

Downloads all requested images as a zip file. Assumes all permissions have been checked on the requested resource.

void downloadImagesAsZip ([ $gallery = null], [unknown_type $images = array()])
  • unknown_type $images
  • $gallery
getAvailableStyles (line 825)

Get an array of all currently viewable styles.

void getAvailableStyles ()
getBreadCrumbs (line 655)

Generate a list of breadcrumbs showing where we are in the gallery tree.

void getBreadCrumbs ([ $separator = ' » '], [ $gallery = null])
  • $separator
  • $gallery
getDateParameter (line 944)

Get a date parts array containing only enough date parts for the depth we are at. If an empty array is passed, attempt to get the parts from url parametrs. Any missing date parts must be set to 0.

  • return: trimmed down (if necessary) date parts array.
A getDateParameter ([array $date = array()])
  • array $date: A full date parts array or an empty array.
getDb (line 31)

Create and initialize the database object.

  • return: MDB2 object || PEAR_Error
mixed &getDb ()
getErrorImage (line 164)

Return a link to a photo placeholder, suitable for use in an <img/> tag (or a Horde::img() call, with the path parameter set to * '').

This photo should be used as a placeholder if the correct photo can't be retrieved

  • return: The image path.
string getErrorImage ([string $view = 'screen'])
  • string $view: The view ('screen', 'thumb', or 'full') to show. Defaults to 'screen'.
getImageFromFile (line 521)

Read an image from the filesystem.

  • return: The image data of the file as an array or PEAR_Error
array getImageFromFile (string $file, [array $override = array()])
  • string $file: The filename of the image.
  • array $override: Overwrite the file array with these values.
getImageObject (line 502)

Obtain a Horde_Image object

  • return: object | PEAR_Error
Horde_Image getImageObject ([array $params = array()])
  • array $params: Any additional parameters
getImageUrl (line 430)

Return a link to an image, suitable for use in an <img/> tag Takes into account $conf['vfs']['direct'] and other factors.

  • return: The image path.
string getImageUrl (string $imageId, [string $view = 'screen'], [boolean $full = false], [string $style = null])
  • string $imageId: The id of the image.
  • string $view: The view ('screen', 'thumb', 'prettythumb' or 'full') to show.
  • boolean $full: Return a path that includes the server name?
  • string $style: Use this gallery style
getMenu (line 585)

Build Ansel's list of menu items.

void getMenu ([ $returnType = 'object'])
  • $returnType
getStyleDefinition (line 868)

Get a style definition for the requested named style

  • return: The definition of the requested style if it's available otherwise, the ansel_default style is returned.
array getStyleDefinition (string $style)
  • string $style: The name of the style to fetch
getStyleSelect (line 788)

Build a HTML <select> element containing all the available gallery styles.

  • return: The HTML for the <select> element.
string getStyleSelect (string $element_name, [string $selected = ''])
  • string $element_name: The element's id/name attribute.
  • string $selected: Mark this element as currently selected.
getUrlFor (line 181)

Return a properly formatted link depending on the global pretty url configuration

void getUrlFor (string $controller, array $data, [boolean $full = false], [integer $append_session = 0], string 4)
  • string $controller: The controller to generate a URL for.
  • array $data: The data needed to generate the URL.
  • boolean $full: Generate a full URL.
  • integer $append_session:
    1. = only if needed, 1 = always, -1 = never.
  • string 4: The generated URL
getVFS (line 66)

Create and initialize the VFS object

  • return: object or fatals on error.
VFS &getVFS ()
isAvailable (line 560)

Check to see if a particular image manipulation function is available.

  • return: True if the function is available.
boolean isAvailable (string $feature)
  • string $feature: The name of the function.
selectGalleries (line 104)

Return a string containing an <option> listing of the given gallery array.

  • return: The <option> list.
string selectGalleries ([array $selected = null], [integer $perm = PERMS_SHOW], [mixed $attributes = null], [string $parent = null], [ $allLevels = true], [integer $from = 0], [integer $count = 0], [integer $ignore = null])
  • array $selected: The gallery_id of the gallery that is selected by default in the returned option list.
  • integer $perm: The permissions filter to use.
  • mixed $attributes: Restrict the galleries returned to those matching $attributes. An array of attribute/values pairs or a gallery owner username.
  • string $parent: The parent share to start listing at.
  • integer $from: The gallery to start listing at.
  • integer $count: The number of galleries to return.
  • integer $ignore: An Ansel_Gallery id to ignore when building the tree.
  • $allLevels
stylesheetLinks (line 910)

Output the stylesheet links

void stylesheetLinks ([boolean $custom_only = false])
  • boolean $custom_only: Don't include ansel's base CSS file

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