eZ Publish  [trunk]
eZMedia Class Reference

The class eZMedia handles registered media files. More...

+ Inheritance diagram for eZMedia:
+ Collaboration diagram for eZMedia:

List of all members.

Public Member Functions

 eZMedia ($row)
 filePath ()
 fileSize ()
 mimeTypeCategory ()
 mimeTypePart ()
 storedFileInfo ()

Static Public Member Functions

static create ($contentObjectAttributeID, $version)
static definition ()
 Returns the definition for the object, the default implementation is to return an empty array.
static fetch ($id, $version, $asObject=true)
static fetchByContentObjectID ($contentObjectID, $languageCode=null, $asObject=true)
 Fetch media objects by content object id.
static fetchByFileName ($filename, $version=null, $asObject=true)
static removeByID ($id, $version)

Public Attributes

 $ContentObjectAttributeID
 $Controls
 $Filename
 $HasController
 $Height
 $IsAutoplay
 $IsLoop
 $MimeType
 $OriginalFilename
 $Pluginspage
 $Quality
 $Width

Detailed Description

The class eZMedia handles registered media files.

Definition at line 18 of file ezmedia.php.


Member Function Documentation

static eZMedia::create ( contentObjectAttributeID,
version 
) [static]

Definition at line 128 of file ezmedia.php.

static eZMedia::definition ( ) [static]

Returns the definition for the object, the default implementation is to return an empty array.

It's upto each inheriting class to return a proper definition array.

The definition array is an associative array consists of these keys:

  • fields: an associative array of fields which defines which database field (the key) is to fetched and how they map to object member variables (the value).
  • keys: an array of fields which is used for uniquely identifying the object in the table.
  • function_attributes: an associative array of attributes which maps to member functions, used for fetching data with functions.
  • set_functions: an associative array of attributes which maps to member functions, used for setting data with functions.
  • increment_key: the field which is incremented on table inserts.
  • class_name: the classname which is used for instantiating new objecs when fetching from the database.
  • sort: an associative array which defines the default sorting of lists, the key is the table field while the value is the sorting method which is either 'asc' or 'desc'.
  • name: the name of the database table

Example: public static function definition() { return array( "fields" => array( "id" => "ID", "version" => "Version", "name" => "Name" ), "keys" => array( "id", "version" ), "function_attributes" => array( "current" => "currentVersion", "class_name" => "className" ), "increment_key" => "id", "class_name" => "eZContentClass", "sort" => array( "id" => "asc" ), "name" => "ezcontentclass" ); }

Returns:
array

Reimplemented from eZPersistentObject.

Definition at line 25 of file ezmedia.php.

Referenced by fetch(), fetchByFileName(), and removeByID().

eZMedia::eZMedia ( row)

Definition at line 20 of file ezmedia.php.

Referenced by create().

static eZMedia::fetchByContentObjectID ( contentObjectID,
languageCode = null,
asObject = true 
) [static]

Fetch media objects by content object id.

Parameters:
int$contentObjectIDcontentobject id
string$languageCodelanguage code
boolean$asObjectif return object
Returns:
array

Definition at line 196 of file ezmedia.php.

Referenced by eZMediaType\deleteStoredObjectAttribute().

static eZMedia::fetchByFileName ( filename,
version = null,
asObject = true 
) [static]

Definition at line 168 of file ezmedia.php.

Referenced by eZMediaType\trashStoredObjectAttribute().

Definition at line 110 of file ezmedia.php.

Definition at line 96 of file ezmedia.php.

Definition at line 116 of file ezmedia.php.

Definition at line 122 of file ezmedia.php.

static eZMedia::removeByID ( id,
version 
) [static]

Definition at line 224 of file ezmedia.php.

Referenced by eZMediaType\deleteStoredObjectAttribute().

Definition at line 239 of file ezmedia.php.

Referenced by filePath(), and fileSize().


Member Data Documentation

eZMedia::$ContentObjectAttributeID

Definition at line 260 of file ezmedia.php.

eZMedia::$Controls

Definition at line 267 of file ezmedia.php.

eZMedia::$Filename

Definition at line 261 of file ezmedia.php.

eZMedia::$HasController

Definition at line 266 of file ezmedia.php.

eZMedia::$Height

Definition at line 265 of file ezmedia.php.

eZMedia::$IsAutoplay

Definition at line 269 of file ezmedia.php.

eZMedia::$IsLoop

Definition at line 268 of file ezmedia.php.

eZMedia::$MimeType

Definition at line 263 of file ezmedia.php.

eZMedia::$OriginalFilename

Definition at line 262 of file ezmedia.php.

eZMedia::$Pluginspage

Definition at line 270 of file ezmedia.php.

eZMedia::$Quality

Definition at line 271 of file ezmedia.php.

eZMedia::$Width

Definition at line 264 of file ezmedia.php.


The documentation for this class was generated from the following file: