phpDocumentor Thumbnail
Classes
[ class tree: Thumbnail ] [ index: Thumbnail ] [ all elements ]

Class: ThumbnailHelper

Source Location: /modules/thumbnail/classes/ThumbnailHelper.class

Class ThumbnailHelper

Method Summary
array   addItem()   Add new ThumbnailImage
GalleryStatus   applyThumbnail()   Create or update thumbnail derivative to be sourced from a ThumbnailImage
array   fetchMimeTypeMap()   Get supported mime types
array   fetchThumbnail()   Fetch ThumbnailImage for given item
array   fetchThumbnails()   Return a map of itemId => fileName for ThumbnailImage entities
array   fetchToolkitSupport()   Get information about thumbnail support from other toolkits
array   getMimeTypeMap()   Return mime types and applicable file extensions
GalleryStatus   registerToolkitOperation()   Register toolkit operation for given mime type(s).
GalleryStatus   updateItem()   Add or delete a mime type from an existing ThumbnailImage

[ Top ]
Methods
addItem  [line 220]

  array addItem( string $mimeType, int $parentId, string $filename, string $tmpfile, string $fileMimeType, [array $knownSize = array()], [ThumbnailImage $item = null]  )

Add new ThumbnailImage

Parameters:
string   $mimeType:  mime type to be supported, or null
int   $parentId:  parent item id, or null
string   $filename:  name for image
string   $tmpfile:  path to image file
string   $fileMimeType:  mime type of image file
array   $knownSize:  known width and height of image (used if toolkit unable to get size)
ThumbnailImage   $item:  (optional -- if you don't provide it we'll get one from the Factory)

API Tags:
Return:  GalleryStatus a status code, int id of newly created object


[ Top ]
applyThumbnail  [line 344]

  GalleryStatus applyThumbnail( &$item, int $thumbnailId, GalleryItem $item  )

Create or update thumbnail derivative to be sourced from a ThumbnailImage

Parameters:
GalleryItem   $item: 
int   $thumbnailId:  id of ThumbnailImage
   &$item: 

API Tags:
Return:  a status code


[ Top ]
fetchMimeTypeMap  [line 123]

  array fetchMimeTypeMap( )

Get supported mime types


API Tags:
Return:  GalleryStatus a status code array of mimeType=>itemId


[ Top ]
fetchThumbnail  [line 94]

  array fetchThumbnail( int $itemId  )

Fetch ThumbnailImage for given item

Parameters:
int   $itemId: 

API Tags:
Return:  GalleryStatus a status code ThumbnailImage or null


[ Top ]
fetchThumbnails  [line 50]

  array fetchThumbnails( [boolean $listAll = false], [int $count = null], [int $offset = null], [string $substring = null]  )

Return a map of itemId => fileName for ThumbnailImage entities

You can specify how many items to list, and where the windows is in the list of all items.

Parameters:
boolean   $listAll:  (optional) true to list all; by default only items with mimeTypeList
int   $count:  (optional) the number of items desired
int   $offset:  (optional) the start of the range
string   $substring:  (optional) a substring to match

API Tags:
Return:  GalleryStatus a status code array of itemId=>fileName


[ Top ]
fetchToolkitSupport  [line 150]

  array fetchToolkitSupport( [boolean $byMimeType = true]  )

Get information about thumbnail support from other toolkits

Parameters:
boolean   $byMimeType:  (optional) true for data by-mimeType, false for data by-toolkit

API Tags:
Return:  GalleryStatus a status code, :by-mimeType: array of mimeType=>array(toolkit ids) or by-toolkit: array of toolkitId=>array(mimeTypes), :by-mimeType: null or by-toolkit: array of mimeType conflicts


[ Top ]
getMimeTypeMap  [line 426]

  array getMimeTypeMap( )

Return mime types and applicable file extensions


API Tags:
Return:  GalleryStatus a status code array (string mime type => string list of extensions)


[ Top ]
registerToolkitOperation  [line 183]

  GalleryStatus registerToolkitOperation( mixed $mimeTypes  )

Register toolkit operation for given mime type(s).

Parameters:
mixed   $mimeTypes:  array or single string

API Tags:
Return:  a status code


[ Top ]
updateItem  [line 291]

  GalleryStatus updateItem( int $itemId, string $mimeType, [boolean $isAdd = true]  )

Add or delete a mime type from an existing ThumbnailImage

Parameters:
int   $itemId:  id of the ThumbnailImage
string   $mimeType:  mime type
boolean   $isAdd:  (optional) true to add mime type, false to delete

API Tags:
Return:  a status code


[ Top ]

Documentation generated on Fri, 08 Oct 2010 06:00:26 -0700 by phpDocumentor 1.3.0RC6