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

Class: GalleryDataItem

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

Class GalleryDataItem

Class Overview

A subclass of GalleryItem for items containing actual data.

DataItems are ones that have an actual data source, such as PhotoItem or MovieItem.

Located in /modules/core/classes/GalleryDataItem.class [line 48]

GalleryPersistent
   |
   --GalleryEntity
      |
      --GalleryChildEntity
         |
         --GalleryFileSystemEntity
            |
            --GalleryItem
               |
               --GalleryDataItem

Properties

Methods

[ Top ]
Direct descendents
Child Class Description
GalleryAnimationItem A subclass of DataItem for containing Animations.
GalleryMovieItem A subclass of DataItem for containing Movies.
GalleryPhotoItem A subclass of DataItem for containing Photos.
GalleryUnknownItem A subclass of DataItem for containing unknown objects.
ItemEditAlbumPluginTestDataItem Mock data item
DerivativeTestItem Test item

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

Inherited From GalleryItem

GalleryItem::$canContainChildren
GalleryItem::$description
GalleryItem::$keywords
GalleryItem::$originationTimestamp
GalleryItem::$ownerId
GalleryItem::$renderer
GalleryItem::$summary
GalleryItem::$title
GalleryItem::$viewedSinceTimestamp

Inherited From GalleryFileSystemEntity

GalleryFileSystemEntity::$pathComponent

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 GalleryItem

GalleryItem::create()
Create a new instance of this GalleryEntity in the persistent store.
GalleryItem::createLink()
GalleryItem::createRoot()
Create a root level instance of this GalleryEntity in the persistent store.
GalleryItem::delete()
Delete this GalleryEntity. Delete all of its children also, if it has any.
GalleryItem::getCanContainChildren()
GalleryItem::getClassName()
GalleryItem::getDescription()
GalleryItem::getKeywords()
GalleryItem::getOriginationTimestamp()
GalleryItem::getOwnerId()
GalleryItem::getRenderer()
GalleryItem::getSummary()
GalleryItem::getTitle()
GalleryItem::getViewedSinceTimestamp()
GalleryItem::move()
Move item to a new parent
GalleryItem::save()
Save the changes to this GalleryItem.
GalleryItem::setCanContainChildren()
GalleryItem::setDescription()
GalleryItem::setKeywords()
GalleryItem::setOriginationTimestamp()
GalleryItem::setOwnerId()
GalleryItem::setRenderer()
GalleryItem::setSummary()
GalleryItem::setTitle()
GalleryItem::setViewedSinceTimestamp()

Inherited From GalleryFileSystemEntity

GalleryFileSystemEntity::create()
Create a new instance of this FileSystemEntity in the persistent store.
GalleryFileSystemEntity::createLink()
GalleryFileSystemEntity::createRoot()
Create a new root level instance of this FileSystemEntity in the persistent store.
GalleryFileSystemEntity::delete()
Delete this GalleryFileSystemEntity
GalleryFileSystemEntity::fetchContainerPath()
Return a path for any objects contained within this one (ie, children)
GalleryFileSystemEntity::fetchLogicalPath()
Return the logical path to this item. Note that this path is only valid as long as the entire tree is at least read locked.
GalleryFileSystemEntity::fetchPath()
Return the full path of this item. Note that this path is only valid as long as the entire tree is at least read locked.
GalleryFileSystemEntity::getClassName()
GalleryFileSystemEntity::getPathComponent()
GalleryFileSystemEntity::isContainer()
Can this item contain other file system items?
GalleryFileSystemEntity::move()
Move item to a new parent
GalleryFileSystemEntity::rename()
Rename this item
GalleryFileSystemEntity::setPathComponent()

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   $mimeType   The mime type of the data file
int   $size   The byte size of the data file

[ Top ]
Method Summary
boolean   canBeViewedInline()   Data items that can be viewed inline (photos, movies, etc) should return true.
GalleryStatus   create()   Create a new instance of this type in the persistent store.
GalleryStatus   delete()   Delete this GalleryEntity
void   detachLink()  
array   fetchPath()   Get the full path to the data file.
void   getClassName()  
void   getMimeType()  
void   getSize()  
GalleryStatus   rename()   Rename this DataItem
void   render()  
GalleryStatus   rescan()   Scan this item's data for changes.
void   setMimeType()  
void   setSize()  
boolean   _canBeViewedInline()   Helper function to check renderer and list of mime types for canBeViewedInline.

[ Top ]
Properties
string   $mimeType [line 62]

The mime type of the 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>READ</member-external-access>
G2:  <linked/>
G2:  </member>

[ Top ]
int   $size [line 75]

The byte size of the data file

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

[ Top ]
Methods
canBeViewedInline  [line 86]

  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 123]

  GalleryStatus create( int $parentId, string $inputFileName, string $mimeType, [string $targetName = null], [boolean $symlink = false]  )

Create a new instance of this type in the persistent store.

Parameters:
int   $parentId:  the id of the parent GalleryItem
string   $inputFileName:  the path to a data file to be contained
string   $mimeType:  the mime type of the new item
string   $targetName:  (optional) the desired name of the new item
boolean   $symlink:  (optional) a boolean true if we should symlink instead of copy (default is false).

API Tags:
Return:  a status code


Redefinition of:
GalleryItem::create()
Create a new instance of this GalleryEntity in the persistent store.

Redefined in descendants as:

[ Top ]
delete  [line 240]

  GalleryStatus delete( )

Delete this GalleryEntity


API Tags:
Return:  a status code


Redefinition of:
GalleryItem::delete()
Delete this GalleryEntity. Delete all of its children also, if it has any.

[ Top ]
detachLink  [line 199]

  void detachLink( )


API Tags:
See:  GalleryEntity::detachLink


Redefinition of:
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.

[ Top ]
fetchPath  [line 371]

  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


Redefinition of:
GalleryFileSystemEntity::fetchPath()
Return the full path of this item. Note that this path is only valid as long as the entire tree is at least read locked.

[ Top ]
getMimeType  [line 410]

  void getMimeType( )



[ Top ]
getSize  [line 418]

  void getSize( )



[ Top ]
rename  [line 294]

  GalleryStatus rename( string $newName  )

Rename this DataItem

Parameters:
string   $newName:  the path component

API Tags:
Return:  a status code


Redefinition of:
GalleryFileSystemEntity::rename()
Rename this item

[ Top ]
render  [line 399]

  void render( $format, $params  )

Parameters:
   $format: 
   $params: 

API Tags:
See:  GalleryRenderer::render

Information Tags:
Todo:  Change this API to match that of GalleryRenderer::render() on the next major GalleryModule API bump.

Redefined in descendants as:

[ Top ]
rescan  [line 273]

  GalleryStatus rescan( )

Scan this item's data for changes.


API Tags:
Return:  a status code


Redefined in descendants as:

[ Top ]
setMimeType  [line 414]

  void setMimeType( $mimeType  )

Parameters:
   $mimeType: 


[ Top ]
setSize  [line 422]

  void setSize( $size  )

Parameters:
   $size: 


[ Top ]
_canBeViewedInline  [line 97]

  boolean _canBeViewedInline( [array $mimeList = null]  )

Helper function to check renderer and list of mime types for canBeViewedInline.

Parameters:
array   $mimeList:  (optional) list of mime types that render() will support

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


[ Top ]

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