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

Class: GalleryDerivative

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

Class GalleryDerivative

Direct descendents
Child Class Description
GalleryDerivativeImage A GalleryDerivative for images.

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From GalleryChildEntity

GalleryChildEntity::$parentId

Inherited From GalleryEntity

GalleryEntity::$creationTimestamp
GalleryEntity::$entityType
GalleryEntity::$id
GalleryEntity::$isLinkable
GalleryEntity::$linkedEntity
GalleryEntity::$linkId
GalleryEntity::$modificationTimestamp
GalleryEntity::$onLoadHandlers
GalleryEntity::$serialNumber

Inherited From GalleryPersistent

GalleryPersistent::$_persistentStatus

Inherited From GalleryChildEntity

GalleryChildEntity::create()
Create this item in our persistent store
GalleryChildEntity::createLink()
GalleryChildEntity::createRoot()
Create a root level item.
GalleryChildEntity::fetchParent()
Get the parent instance
GalleryChildEntity::getClassName()
GalleryChildEntity::getParentId()
GalleryChildEntity::move()
Move this item to a new parent
GalleryChildEntity::setParentId()

Inherited From GalleryEntity

GalleryEntity::addOnLoadHandler()
Add onLoad handler.
GalleryEntity::create()
Create a new instance of this GalleryEntity in the persistent store
GalleryEntity::createLink()
Create a new linked version of this item into a new album
GalleryEntity::delete()
Delete this GalleryEntity
GalleryEntity::detachLink()
Detach this entity from the entity it is linked to by the simple expedient of overwriting over all non-null members with the equivalent from the link target.
GalleryEntity::getClassName()
Return the case sensitive name of this entity class. This is exactly what get_class() would return in PHP5. PHP4 is case-insensitive though so we must rely on it being set in each entity. The framework uses this as an index into entity related tables.
GalleryEntity::getCreationTimestamp()
GalleryEntity::getEntityType()
GalleryEntity::getId()
GalleryEntity::getIsLinkable()
GalleryEntity::getLinkedEntity()
GalleryEntity::getLinkId()
GalleryEntity::getModificationTimestamp()
GalleryEntity::getOnLoadHandlers()
GalleryEntity::getRenderer()
GalleryEntity::getSerialNumber()
GalleryEntity::hasOnLoadHandler()
Check for an onLoad handler.
GalleryEntity::isLinked()
Return true if this entity is linked to another
GalleryEntity::itemTypeName()
Return the name of this type of item.
GalleryEntity::onLoad()
This is called after an entity is loaded by the GalleryStorage subsystem.
GalleryEntity::onSave()
This is called after an entity is saved by the GalleryStorage subsystem.
GalleryEntity::refresh()
Refresh this item from the persistent store
GalleryEntity::removeOnLoadHandler()
Remove onLoad handler.
GalleryEntity::save()
Save the changes to this GalleryEntity.
GalleryEntity::setCreationTimestamp()
GalleryEntity::setEntityType()
GalleryEntity::setId()
GalleryEntity::setIsLinkable()
GalleryEntity::setLinkedEntity()
GalleryEntity::setLinkId()
GalleryEntity::setModificationTimestamp()
GalleryEntity::setOnLoadHandlers()
GalleryEntity::setSerialNumber()

Inherited From GalleryPersistent

GalleryPersistent::GalleryPersistent()
GalleryPersistent::clearPersistentFlag()
Clear a flag.
GalleryPersistent::getClassFile()
Return the relative path to the class for this entity
GalleryPersistent::getOriginalValue()
Return the original value of the given member.
GalleryPersistent::isModified()
Have we modified any data in this class?
GalleryPersistent::resetOriginalValues()
Reset all original values to the current values in the entity (or null if so specified).
GalleryPersistent::setPersistentFlag()
Set a flag.
GalleryPersistent::testPersistentFlag()
Test a flag.

[ Top ]
Property Summary
string   $derivativeOperations   A sequence of operations used to derive this data from the original.
int   $derivativeOrder   The order of this derivative relative to others
int   $derivativeSize   The size of the derived object
int   $derivativeSourceId   What's the source of this derivative? The source must be the id of another data container.
int   $derivativeType   The type of this derivative (eg, DERIVATIVE_TYPE_IMAGE_THUMBNAIL)
boolean   $isBroken   Is the derivative broken? We set this to true if a toolkit operation failed, or for similar reasons.
string   $mimeType   The mime type of data file
string   $postFilterOperations   More operations that are applied at the very end of the derivative operations, and are not carried down to derivatives that depend on this one. Useful for operations like watermarking that change the derivative in a way that we don't want to propagate.

[ Top ]
Method Summary
boolean   canBeViewedInline()   Data items that can be viewed inline (photos, movies, etc) should return true. Items that can't be viewed inline (word documents, text, etc) should return false.
GalleryStatus   create()   Create a new GalleryDerivative
GalleryStatus   delete()   Delete this GalleryEntity
GalleryStatus   expireCache()   Expire the cache.
array   fetchFinalOperations()   Get the complete set of operations required by this derivative. This will return the original source GalleryDataItem or preferred GalleryDerivative and an array of all the operations that must be performed in order to create the correct output file, including the post filter.
array   fetchPath()   Get the full path to the data file.
string   getBrokenDerivativePath()   Return path for broken derivative placeholder which is shown when we fail to generate a derivative item. Descendent classes can override this method to use their own broken derivative placeholder, which can be of any mime type, eg. a wav file for broken audio derivatives, etc.
void   getClassName()  
void   getDerivativeOperations()  
void   getDerivativeOrder()  
void   getDerivativeSize()  
void   getDerivativeSourceId()  
void   getDerivativeType()  
void   getIsBroken()  
void   getMimeType()  
void   getPostFilterOperations()  
boolean   hasNoOperations()   Return true if we have no derivative or postfilter operations
array   isCacheCurrent()   Is the cache for this item still current? If the cache is expired, it can be rebuilt with rebuildCache()
GalleryStatus   rebuildCache()   Rebuild the cache. This should never be called directly; instead you should call GalleryCoreApi::rebuildDerivativeCacheIfNotCurrent($derivativeId)
string   render()   Render this item in the given format. For example, GalleryDerivativeImage may want to render as an <img> tag in the HTML format.
void   save()  
void   setDerivativeOperations()  
void   setDerivativeOrder()  
void   setDerivativeSize()  
void   setDerivativeSourceId()  
void   setDerivativeType()  
void   setIsBroken()  
void   setMimeType()  
void   setPostFilterOperations()  
GalleryStatus   _rebuildCache()   Rebuild the cache. This should never be called directly; instead you should call GalleryCoreApi::rebuildDerivativeCacheIfNotCurrent($derivativeId)

[ Top ]
Properties
string   $derivativeOperations [line 75]

A sequence of operations used to derive this data from the original.

Can be empty, because the derivative can have only a postfilter.

Information Tags:
G2:  <member>
G2:  <member-name>derivativeOperations</member-name>
G2:  <member-type>STRING</member-type>
G2:  <member-size>LARGE</member-size>
G2:  </member>

[ Top ]
int   $derivativeOrder [line 88]

The order of this derivative relative to others

Information Tags:
G2:  <member-name>derivativeOrder</member-name>
G2:  <member>
G2:  <member-type>INTEGER</member-type>
G2:  <indexed/>
G2:  <required/>
G2:  </member>

[ Top ]
int   $derivativeSize [line 100]

The size of the derived object

Information Tags:
G2:  <member>
G2:  <member-name>derivativeSize</member-name>
G2:  <member-type>INTEGER</member-type>
G2:  <member-external-access>READ</member-external-access>
G2:  </member>

[ Top ]
int   $derivativeSourceId [line 62]

What's the source of this derivative? The source must be the id of another data container.

Information Tags:
G2:  <member-name>derivativeSourceId</member-name>
G2:  <member>
G2:  <member-type>INTEGER</member-type>
G2:  <indexed/>
G2:  <member-external-access>READ</member-external-access>
G2:  <required/>
G2:  </member>

[ Top ]
int   $derivativeType [line 113]

The type of this derivative (eg, DERIVATIVE_TYPE_IMAGE_THUMBNAIL)

Information Tags:
G2:  <member-name>derivativeType</member-name>
G2:  <member>
G2:  <member-type>INTEGER</member-type>
G2:  <indexed/>
G2:  <required/>
G2:  </member>

[ Top ]
boolean   $isBroken [line 155]

Is the derivative broken? We set this to true if a toolkit operation failed, or for similar reasons.

Can be empty, which is interpreted as false.

Information Tags:
G2:  <member>
G2:  <member-name>isBroken</member-name>
G2:  <member-type>BOOLEAN</member-type>
G2:  </member>

[ Top ]
string   $mimeType [line 127]

The mime type of data file

Information Tags:
G2:  <member-name>mimeType</member-name>
G2:  <member>
G2:  <member-type>STRING</member-type>
G2:  <member-size>MEDIUM</member-size>
G2:  <member-external-access>FULL</member-external-access>
G2:  <required/>
G2:  </member>

[ Top ]
string   $postFilterOperations [line 142]

More operations that are applied at the very end of the derivative operations, and are not carried down to derivatives that depend on this one. Useful for operations like watermarking that change the derivative in a way that we don't want to propagate.

Can be empty, because the derivative can have only a regular derivative operations.

Information Tags:
G2:  <member>
G2:  <member-name>postFilterOperations</member-name>
G2:  <member-type>STRING</member-type>
G2:  <member-size>LARGE</member-size>
G2:  </member>

[ Top ]
Methods
canBeViewedInline  [line 166]

  boolean canBeViewedInline( )

Data items that can be viewed inline (photos, movies, etc) should return true. Items that can't be viewed inline (word documents, text, etc) should return false.

Classes that return true for this query must implement getWidth() and getHeight()


API Tags:
Return:  true if this data item can be viewed inline


Redefined in descendants as:

[ Top ]
create  [line 222]

  GalleryStatus create( int $parentId  )

Create a new GalleryDerivative

Parameters:
int   $parentId:  the id of the parent GalleryItem

API Tags:
Return:  a status code


Redefinition of:
GalleryChildEntity::create()
Create this item in our persistent store

Redefined in descendants as:

[ Top ]
delete  [line 175]

  GalleryStatus delete( )

Delete this GalleryEntity


API Tags:
Return:  a status code


Redefinition of:
GalleryEntity::delete()
Delete this GalleryEntity

[ Top ]
expireCache  [line 627]

  GalleryStatus expireCache( )

Expire the cache.


API Tags:
Return:  a status code


[ Top ]
fetchFinalOperations  [line 515]

  array fetchFinalOperations( )

Get the complete set of operations required by this derivative. This will return the original source GalleryDataItem or preferred GalleryDerivative and an array of all the operations that must be performed in order to create the correct output file, including the post filter.


API Tags:
Return:  GalleryStatus a status code GalleryDataItem data item or GalleryDerivative preferred derivative array the operations


[ Top ]
fetchPath  [line 651]

  array fetchPath( )

Get the full path to the data file.


API Tags:
Return:  GalleryStatus a status code, string a path where children can store their data files


[ Top ]
getBrokenDerivativePath  [line 690]

  string getBrokenDerivativePath( )

Return path for broken derivative placeholder which is shown when we fail to generate a derivative item. Descendent classes can override this method to use their own broken derivative placeholder, which can be of any mime type, eg. a wav file for broken audio derivatives, etc.


API Tags:
Return:  the path of the broken derivative medium


[ Top ]
getClassName  [line 698]

  void getClassName( )


API Tags:
See:  GalleryEntity::getClassName


Redefinition of:
GalleryChildEntity::getClassName()

Redefined in descendants as:

[ Top ]
getDerivativeOperations  [line 710]

  void getDerivativeOperations( )



[ Top ]
getDerivativeOrder  [line 718]

  void getDerivativeOrder( )



[ Top ]
getDerivativeSize  [line 726]

  void getDerivativeSize( )



[ Top ]
getDerivativeSourceId  [line 702]

  void getDerivativeSourceId( )



[ Top ]
getDerivativeType  [line 734]

  void getDerivativeType( )



[ Top ]
getIsBroken  [line 758]

  void getIsBroken( )



[ Top ]
getMimeType  [line 742]

  void getMimeType( )



[ Top ]
getPostFilterOperations  [line 750]

  void getPostFilterOperations( )



[ Top ]
hasNoOperations  [line 676]

  boolean hasNoOperations( )

Return true if we have no derivative or postfilter operations



[ Top ]
isCacheCurrent  [line 610]

  array isCacheCurrent( )

Is the cache for this item still current? If the cache is expired, it can be rebuilt with rebuildCache()


API Tags:
Return:  GalleryStatus a status code, boolean false if the item is expired (ie, empty cache)


[ Top ]
rebuildCache  [line 279]

  GalleryStatus rebuildCache( )

Rebuild the cache. This should never be called directly; instead you should call GalleryCoreApi::rebuildDerivativeCacheIfNotCurrent($derivativeId)

Rebuilds the cache and marks the derivative as broken if we failed.


API Tags:
Return:  a status code


Redefined in descendants as:

[ Top ]
render  [line 668]

  string render( string $format, GalleryDataItem $item, array $params  )

Render this item in the given format. For example, GalleryDerivativeImage may want to render as an <img> tag in the HTML format.

Parameters:
string   $format:  the format (eg. HTML)
GalleryDataItem   $item:  the data item
array   $params:  format specific key value pairs

API Tags:
Return:  output


Redefined in descendants as:

[ Top ]
save  [line 243]

  void save( [ $expire = true], [ $postEvent = true]  )

Parameters:
   $expire: 
   $postEvent: 

API Tags:
See:  GalleryEntity::save


Redefinition of:
GalleryEntity::save()
Save the changes to this GalleryEntity.

[ Top ]
setDerivativeOperations  [line 714]

  void setDerivativeOperations( $derivativeOperations  )

Parameters:
   $derivativeOperations: 


[ Top ]
setDerivativeOrder  [line 722]

  void setDerivativeOrder( $derivativeOrder  )

Parameters:
   $derivativeOrder: 


[ Top ]
setDerivativeSize  [line 730]

  void setDerivativeSize( $derivativeSize  )

Parameters:
   $derivativeSize: 


[ Top ]
setDerivativeSourceId  [line 706]

  void setDerivativeSourceId( $derivativeSourceId  )

Parameters:
   $derivativeSourceId: 


[ Top ]
setDerivativeType  [line 738]

  void setDerivativeType( $derivativeType  )

Parameters:
   $derivativeType: 


[ Top ]
setIsBroken  [line 762]

  void setIsBroken( $isBroken  )

Parameters:
   $isBroken: 


[ Top ]
setMimeType  [line 746]

  void setMimeType( $mimeType  )

Parameters:
   $mimeType: 


[ Top ]
setPostFilterOperations  [line 754]

  void setPostFilterOperations( $postFilterOperations  )

Parameters:
   $postFilterOperations: 


[ Top ]
_rebuildCache  [line 354]

  GalleryStatus _rebuildCache( )

Rebuild the cache. This should never be called directly; instead you should call GalleryCoreApi::rebuildDerivativeCacheIfNotCurrent($derivativeId)


API Tags:
Return:  a status code
Access:  private


[ Top ]

Documentation generated on Fri, 08 Oct 2010 04:57:31 -0700 by phpDocumentor 1.3.0RC6