eZ Publish  [trunk]
eZMediaType Class Reference

The class eZMediaType handles storage and playback of media files. More...

+ Inheritance diagram for eZMediaType:
+ Collaboration diagram for eZMediaType:

List of all members.

Public Member Functions

 checkFileUploads ()
 customObjectAttributeHTTPAction ($http, $action, $contentObjectAttribute, $parameters)
 deleteStoredObjectAttribute ($contentObjectAttribute, $version=null)
 eZMediaType ()
 fetchClassAttributeHTTPInput ($http, $base, $classAttribute)
 fetchObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 fixupClassAttributeHTTPInput ($http, $base, $classAttribute)
 fromString ($objectAttribute, $string)
 hasObjectAttributeContent ($contentObjectAttribute)
 hasStoredFileInformation ($object, $objectVersion, $objectLanguage, $objectAttribute)
 insertHTTPFile ($object, $objectVersion, $objectLanguage, $objectAttribute, $httpFile, $mimeData, &$result)
 insertRegularFile ($object, $objectVersion, $objectLanguage, $objectAttribute, $filePath, &$result)
 isHTTPFileInsertionSupported ()
 isRegularFileInsertionSupported ()
 metaData ($contentObjectAttribute)
 objectAttributeContent ($contentObjectAttribute)
 postInitializeObjectAttribute ($contentObjectAttribute, $currentVersion, $originalContentObjectAttribute)
 serializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 serializeContentObjectAttribute ($package, $objectAttribute)
 storeClassAttribute ($attribute, $version)
 storeDefinedClassAttribute ($attribute)
 storedFileInformation ($object, $objectVersion, $objectLanguage, $objectAttribute)
 storeObjectAttribute ($contentObjectAttribute)
 supportsBatchInitializeObjectAttribute ()
 title ($contentObjectAttribute, $name="original_filename")
 toString ($objectAttribute)
 trashStoredObjectAttribute ($contentObjectAttribute, $version=null)
 unserializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 unserializeContentObjectAttribute ($package, $objectAttribute, $attributeNode)
 validateClassAttributeHTTPInput ($http, $base, $classAttribute)
 validateObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)

Static Public Member Functions

 pluginPage ($mediaType)

Public Attributes

const DATA_TYPE_STRING = "ezmedia"
const MAX_FILESIZE_FIELD = 'data_int1'
const MAX_FILESIZE_VARIABLE = '_ezmedia_max_filesize_'
const TYPE_FIELD = "data_text1"
const TYPE_VARIABLE = "_ezmedia_type_"

Detailed Description

The class eZMediaType handles storage and playback of media files.

Definition at line 18 of file ezmediatype.php.


Member Function Documentation

Checks if file uploads are enabled, if not it gives a warning.

Definition at line 220 of file ezmediatype.php.

Referenced by fetchObjectAttributeHTTPInput().

eZMediaType::customObjectAttributeHTTPAction ( http,
action,
objectAttribute,
parameters 
)

Executes a custom action for an object attribute which was defined on the web page.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 360 of file ezmediatype.php.

eZMediaType::deleteStoredObjectAttribute ( contentObjectAttribute,
version = null 
)

Delete stored attribute

Reimplemented from eZDataType.

Definition at line 120 of file ezmediatype.php.

Referenced by customObjectAttributeHTTPAction().

Definition at line 26 of file ezmediatype.php.

eZMediaType::fetchClassAttributeHTTPInput ( http,
base,
classAttribute 
)

Fetches the HTTP input for the content class attribute.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 582 of file ezmediatype.php.

eZMediaType::fetchObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

Fetches input and stores it in the data instance.

Reimplemented from eZDataType.

Definition at line 272 of file ezmediatype.php.

eZMediaType::fixupClassAttributeHTTPInput ( http,
base,
classAttribute 
)

Tries to do a fixup on the input text so that it's acceptable as class attribute input.

Note:
Default implementation does nothing and returns accepted.

Reimplemented from eZDataType.

Definition at line 578 of file ezmediatype.php.

eZMediaType::fromString ( objectAttribute,
string 
)

Reimplemented from eZDataType.

Definition at line 658 of file ezmediatype.php.

eZMediaType::hasObjectAttributeContent ( contentObjectAttribute)
Returns:
true if the datatype finds any content in the attribute $contentObjectAttribute.

Reimplemented from eZDataType.

Definition at line 613 of file ezmediatype.php.

eZMediaType::hasStoredFileInformation ( object,
objectVersion,
objectLanguage,
objectAttribute 
)

We support file information

Reimplemented from eZDataType.

Definition at line 544 of file ezmediatype.php.

eZMediaType::insertHTTPFile ( object,
objectVersion,
objectLanguage,
objectAttribute,
httpFile,
mimeData,
&$  result 
)

Inserts the file using the eZMedia class.

Reimplemented from eZDataType.

Definition at line 391 of file ezmediatype.php.

eZMediaType::insertRegularFile ( object,
objectVersion,
objectLanguage,
objectAttribute,
filePath,
&$  result 
)

Inserts the file using the eZMedia class.

Reimplemented from eZDataType.

Definition at line 459 of file ezmediatype.php.

Referenced by fromString().

HTTP file insertion is supported.

Reimplemented from eZDataType.

Definition at line 375 of file ezmediatype.php.

Regular file insertion is supported.

Reimplemented from eZDataType.

Definition at line 383 of file ezmediatype.php.

eZMediaType::metaData ( contentObjectAttribute)
Returns:
the text which should be indexed in the search engine. An associative array can be returned to enable searching in specific parts of the data. E.g. array( 'first_column' => "foo", 'second_column' => "bar" );

Reimplemented from eZDataType.

Definition at line 636 of file ezmediatype.php.

eZMediaType::objectAttributeContent ( objectAttribute)

Returns the content data for the given content object attribute.

Reimplemented from eZDataType.

Definition at line 624 of file ezmediatype.php.

eZMediaType::pluginPage ( mediaType) [static]

Returns plugin page by media type

Definition at line 241 of file ezmediatype.php.

Referenced by fetchObjectAttributeHTTPInput(), insertHTTPFile(), insertRegularFile(), and postInitializeObjectAttribute().

eZMediaType::postInitializeObjectAttribute ( contentObjectAttribute,
currentVersion,
originalContentObjectAttribute 
)

Sets value according to current version

Reimplemented from eZDataType.

Definition at line 35 of file ezmediatype.php.

eZMediaType::serializeContentClassAttribute ( classAttribute,
attributeNode,
attributeParametersNode 
)

Adds the necessary dom structure to the attribute parameters.

Note:
The default is to add unsupported='true' to the attribute node, meaning that the datatype does not support serializing.

Reimplemented from eZDataType.

Definition at line 673 of file ezmediatype.php.

eZMediaType::serializeContentObjectAttribute ( package,
objectAttribute 
)
Parameters:
package
objectAttributecontent attribute
Returns:
a DOM representation of the content object attribute

Reimplemented from eZDataType.

Definition at line 700 of file ezmediatype.php.

eZMediaType::storeClassAttribute ( classAttribute,
version 
)

Stores the datatype data to the database which is related to the class attribute. The $version parameter determines which version is currently being stored, 0 is the real version while 1 is the temporary version.

Returns:
True if the value was stored correctly.
Note:
The method is entirely up to the datatype, for instance it could reuse the available types in the the attribute or store in a separate object.
This function is called after the attribute data has been stored. If you need to alter attribute data use preStoreClassAttribute instead.
See also:
fetchClassAttributeHTTPInput

Reimplemented from eZDataType.

Definition at line 565 of file ezmediatype.php.

Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.
Parameters:
eZContentClassAttribute$classAttributeContent class attribute of the datatype

Reimplemented from eZDataType.

Definition at line 569 of file ezmediatype.php.

eZMediaType::storedFileInformation ( object,
objectVersion,
objectLanguage,
objectAttribute 
)

Extracts file information for the media entry.

Reimplemented from eZDataType.

Definition at line 553 of file ezmediatype.php.

eZMediaType::storeObjectAttribute ( objectAttribute)

Stores the datatype data to the database which is related to the object attribute.

Returns:
True if the value was stored correctly.
Note:
The method is entirely up to the datatype, for instance it could reuse the available types in the the attribute or store in a separate object.
See also:
fetchObjectAttributeHTTPInput

Reimplemented from eZDataType.

Definition at line 356 of file ezmediatype.php.

Reimplemented from eZDataType.

Definition at line 793 of file ezmediatype.php.

eZMediaType::title ( contentObjectAttribute,
name = "original_filename" 
)

Returns the object title.

Reimplemented from eZDataType.

Definition at line 601 of file ezmediatype.php.

eZMediaType::toString ( objectAttribute)
Returns:
string representation of an contentobjectattribute data for simplified export

Reimplemented from eZDataType.

Definition at line 644 of file ezmediatype.php.

eZMediaType::trashStoredObjectAttribute ( contentObjectAttribute,
version = null 
)

The object is being moved to trash, do any necessary changes to the attribute. Rename file and update db row with new name, so that access to the file using old links no longer works.

Reimplemented from eZDataType.

Definition at line 69 of file ezmediatype.php.

eZMediaType::unserializeContentClassAttribute ( classAttribute,
attributeNode,
attributeParametersNode 
)

Extracts values from the attribute parameters and sets it in the class attribute.

Note:
This function is called after the attribute has been stored and a second store is called after this function is done.

Reimplemented from eZDataType.

Definition at line 690 of file ezmediatype.php.

eZMediaType::unserializeContentObjectAttribute ( package,
objectAttribute,
attributeNode 
)

Unserialize contentobject attribute

Parameters:
package
objectAttributecontentobject attribute object
attributeNodeezdomnode object

Reimplemented from eZDataType.

Definition at line 739 of file ezmediatype.php.

eZMediaType::validateClassAttributeHTTPInput ( http,
base,
classAttribute 
)

Validates the input for a class attribute and returns a validation state as defined in eZInputValidator.

Note:
Default implementation does nothing and returns accepted.

Reimplemented from eZDataType.

Definition at line 573 of file ezmediatype.php.

eZMediaType::validateObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

Validates the input and returns true if the input was valid for this datatype.

Reimplemented from eZDataType.

Definition at line 177 of file ezmediatype.php.


Member Data Documentation

const eZMediaType::DATA_TYPE_STRING = "ezmedia"

Definition at line 20 of file ezmediatype.php.

const eZMediaType::MAX_FILESIZE_FIELD = 'data_int1'

Definition at line 21 of file ezmediatype.php.

const eZMediaType::MAX_FILESIZE_VARIABLE = '_ezmedia_max_filesize_'

Definition at line 22 of file ezmediatype.php.

const eZMediaType::TYPE_FIELD = "data_text1"

Definition at line 23 of file ezmediatype.php.

const eZMediaType::TYPE_VARIABLE = "_ezmedia_type_"

Definition at line 24 of file ezmediatype.php.


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