Public Member Functions | |
__construct () | |
Construct and initialize an album. | |
addImageById ($imageId, $caption='') | |
Add an image resource to our album by its SNAP2 path/id. | |
addImageByResource ($imageRes, $caption='') | |
Add an image resource to our album. | |
addImageDirectory ($imageDir) | |
Add an image directory to our album. | |
generateAlbumXML () | |
Generate and return the XML for the album. |
Generate XML that represents an album of photos for display on the website. This is a way of encoding the album as it is passed around between different parts of the framework or stored in a file/database.
Sandy's old comments (I can't bring myself to delete them): "A class that builds album xml. More importantly, it will shock the socks off of jonathan with its ugliness."
AlbumModule::addImageById | ( | $ | imageId, | |
$ | caption = '' | |||
) |
Add an image resource to our album by its SNAP2 path/id.
Take the path or id of a SNAP2 image resource. Look up that resource from SNAP2 and add it to our album. If a caption is passed in, use that caption. Otherwise, use the description of the image from SNAP2 as the caption.
$imageId | [mixed]: The SNAP2 path to the image resource, or the resource id | |
$caption | [string]: A literal caption if you don't want to use the description from SNAP2 as the caption (optional) |
AlbumModule::addImageByResource | ( | $ | imageRes, | |
$ | caption = '' | |||
) |
Add an image resource to our album.
Take a SNAP2 image resource. If a caption is passed in, use that caption. Otherwise, use the description of the image from SNAP2 as the caption.
$imageRes | [SnapResource]: The image resource to be added to the album | |
$caption | [string]: A literal caption if you don't want to use the description from SNAP2 as the caption (optional) |
AlbumModule::addImageDirectory | ( | $ | imageDir | ) |
Add an image directory to our album.
Take a SnapDirectory that contains (only) a set of images. Loop through the resources (images) in this directory and add them to our album.
$imageDir | [SnapDirectory]: A SNAP2 directory that contains only images |
AlbumModule::generateAlbumXML | ( | ) |
Generate and return the XML for the album.
Generate the Album XML, which can be stored or rendered to the screen by a PR2 translator.