eZ Publish  [4.2]
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 ()
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 38 of file ezmedia.php.


Member Function Documentation

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

Definition at line 148 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:

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" );
}

Reimplemented from eZPersistentObject.

Definition at line 45 of file ezmedia.php.

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

eZMedia::eZMedia ( row)

Definition at line 40 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 195 of file ezmedia.php.

Referenced by eZMediaType\deleteStoredObjectAttribute().

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

Definition at line 223 of file ezmedia.php.

Referenced by eZMediaType\trashStoredObjectAttribute().

eZMedia::filePath ( )

Definition at line 130 of file ezmedia.php.

eZMedia::fileSize ( )

Definition at line 116 of file ezmedia.php.

eZMedia::mimeTypeCategory ( )

Definition at line 136 of file ezmedia.php.

eZMedia::mimeTypePart ( )

Definition at line 142 of file ezmedia.php.

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

Definition at line 244 of file ezmedia.php.

Referenced by eZMediaType\deleteStoredObjectAttribute().

eZMedia::storedFileInfo ( )

Definition at line 259 of file ezmedia.php.

Referenced by filePath(), and fileSize().


Member Data Documentation

eZMedia::$ContentObjectAttributeID

Definition at line 280 of file ezmedia.php.

eZMedia::$Controls

Definition at line 287 of file ezmedia.php.

eZMedia::$Filename

Definition at line 281 of file ezmedia.php.

eZMedia::$HasController

Definition at line 286 of file ezmedia.php.

eZMedia::$Height

Definition at line 285 of file ezmedia.php.

eZMedia::$IsAutoplay

Definition at line 289 of file ezmedia.php.

eZMedia::$IsLoop

Definition at line 288 of file ezmedia.php.

eZMedia::$MimeType

Definition at line 283 of file ezmedia.php.

eZMedia::$OriginalFilename

Definition at line 282 of file ezmedia.php.

eZMedia::$Pluginspage

Definition at line 290 of file ezmedia.php.

eZMedia::$Quality

Definition at line 291 of file ezmedia.php.

eZMedia::$Width

Definition at line 284 of file ezmedia.php.


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