phpDocumentor GalleryCore
[ class tree: GalleryCore ] [ index: GalleryCore ] [ all elements ]

Class: GalleryToolkit

Source Location: /modules/core/classes/GalleryToolkit.class

Class GalleryToolkit

Class Overview

A toolkit for manipulating files.

This class defines the API for file manipulation toolkits. It's designed such that we can create many different toolkits, each providing its own unique functions for manipulating files. Some of these toolkits may be centered around a particular technology (eg, NetPBPM, ImageMagick, Jhead, etc) while others may be focussed on a specific type of file (eg JPEG).

Located in /modules/core/classes/GalleryToolkit.class [line 46]

API Tags:


[ Top ]
Direct descendents
Child Class Description
NetPbmToolkit A NetPBM version of GalleryToolkit
ImageBlockToolkit Test toolkit
ImageMagickToolkit A ImageMagick version of GalleryToolkit
SizeLimitOptionTestToolkit Test toolkit
SetSizeOptionTestToolkit Test toolkit
SizeLimitHelperTestToolkit Test toolkit
GdToolkit A Gd version of GalleryToolkit
ExifDescriptionOptionTestToolkit Test toolkit
ExifToolkit A GalleryToolkit that uses the exifer library.
FfmpegToolkit A Ffmpeg version of GalleryToolkit
ThumbOffsetTestToolkit Test toolkit
ThumbPageTestToolkit Test toolkit
ZipCartToolkit Test toolkit
CustomThumbnailOptionTestToolkit Dummy test toolkit
ThumbnailToolkit A version of GalleryToolkit to supply default thumbnail images for non-image mime types.
ItemAddControllerTestToolkit Test toolkit
TestToolkit Mock toolkit
ItemMakeHighlightTestToolkit Dummy test toolkit
ItemMoveTestToolkit Dummy test toolkit
CreateThumbnailOptionTestToolkit Dummy test toolkit
ItemEditAlbumPluginTestToolkit Mock toolkit
PhotoTestToolkit Test toolkit
ItemTestToolkit Test toolkit
AlbumTestToolkit Dummy test toolkit
ItemMoveSingleTestToolkit Dummy test toolkit
ItemEditPhotoPluginTestToolkit Test toolkit
ItemEditPhotoThumbnailPluginTestToolkit Test toolkitk
DerivativeTestToolkit Test toolkit
ItemEditItemPluginTestToolkit Test toolkit
ItemEditRotateAndScalePhotoPluginTestToolkit Test toolkit
DcrawToolkit A Dcraw version of GalleryToolkit
ReuploadOptionTestToolkit Test toolkit
LinkItemToolkit A GalleryToolkit to provide a thumbnail image for an external URL
Getid3Toolkit A getid3 version of GalleryToolkit
ArchiveExtractToolkit A version of GalleryToolkit to extract files from an archive.
SquareThumbTestToolkit Test toolkit
SquareThumbToolkit A version of GalleryToolkit to enforce creation of square thumbnails
RandomHighlightTestToolkit Test toolkit
JpegtranToolkit A Jpegtran version of GalleryToolkit

[ Top ]
Method Summary
static void   estimateDimensions()   Estimate the dimensions of a GalleryDerivativeImage from its operations and its source.
array   applyTransform()   Apply the transform operation to the set of target operations. The transform operation
array   getProperty()   Get a certain property of a file
array   mergeOperations()   Merge two operations together in an intelligent way. The end result of
array   performOperation()   Perform a certain operation

[ Top ]
static method estimateDimensions  [line 240]

  static void estimateDimensions( &$derivative, GalleryEntity $source, GalleryDerivativeImage $derivative  )

Estimate the dimensions of a GalleryDerivativeImage from its operations and its source.

GalleryDerivativeImage   $derivative: 
GalleryEntity   $source:  (probably a GalleryPhotoItem or GalleryMovieItem)

Redefined in descendants as:

[ Top ]
applyTransform  [line 99]

  array applyTransform( string $transformOperation, string $targetOperations, [boolean $reverse = false]  )

Apply the transform operation to the set of target operations. The transform operation

will typically have happened upstream from the target operations, so we have to adjust the target operations to take it into account. For example, if the target operations include a crop operation and upstream we rotate|90 it, then you'd want to rotate the crop's parameters accordingly.

string   $transformOperation:  the upstream transform
string   $targetOperations:  the current set of operations
boolean   $reverse:  true if we should apply the transform in reverse

API Tags:
Return:  boolean success or failure string the new set of operations

[ Top ]
mergeOperations  [line 194]

  array mergeOperations( string $operation1, array $args1, string $operation2, array $args2  )

Merge two operations together in an intelligent way. The end result of

the merge should be a new operation and arguments that would result if you applied the operations in sequence. For example, if the operations are 'rotate|90' and 'rotate|180', then the result would be 'rotate|270' (or 'rotate|-90'). The toolkit should only merge the operations if it can do so cleanly.

string   $operation1:  the first operation
array   $args1:  the first operation's arguments
string   $operation2:  the second operation
array   $args2:  the second operation's arguments

API Tags:
Return:  (true if the operation was success, $mergedOperation, $mergedArgs)

Redefined in descendants as:

[ Top ]
performOperation  [line 81]

  array performOperation( string $mimeType, string $operationName, string $sourceFilename, string $destFilename, array $parameters, [array $context = array()]  )

Perform a certain operation

Perform the wanted operation on sourceFilename and write the results in destFilename. Note: Rules for 'width' and 'height' keys in $context.. If w/h are present in context and toolkit performs an operation that changes the w/h then it must update the context with the new values. (This is optional if the context previously had no w/h values)

string   $mimeType: 
string   $operationName: 
string   $sourceFilename:  the source file name
string   $destFilename:  the destination file name (it will be overwritten if it exists)
array   $parameters: 
array   $context:  (optional) context data

API Tags:
Return:  GalleryStatus a status code string the output mime type array context data

Redefined in descendants as:

[ Top ]

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