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


Member Function Documentation

eZMediaType::checkFileUploads ( )

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

Definition at line 240 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 380 of file ezmediatype.php.

eZMediaType::deleteStoredObjectAttribute ( contentObjectAttribute,
version = null 
)

Delete stored attribute

Reimplemented from eZDataType.

Definition at line 140 of file ezmediatype.php.

Referenced by customObjectAttributeHTTPAction().

eZMediaType::eZMediaType ( )

Definition at line 46 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 602 of file ezmediatype.php.

eZMediaType::fetchObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

Fetches input and stores it in the data instance.

Reimplemented from eZDataType.

Definition at line 292 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 598 of file ezmediatype.php.

eZMediaType::fromString ( objectAttribute,
string 
)

Reimplemented from eZDataType.

Definition at line 678 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 633 of file ezmediatype.php.

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

We support file information

Reimplemented from eZDataType.

Definition at line 564 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 411 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 479 of file ezmediatype.php.

Referenced by fromString().

eZMediaType::isHTTPFileInsertionSupported ( )

HTTP file insertion is supported.

Reimplemented from eZDataType.

Definition at line 395 of file ezmediatype.php.

eZMediaType::isRegularFileInsertionSupported ( )

Regular file insertion is supported.

Reimplemented from eZDataType.

Definition at line 403 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 656 of file ezmediatype.php.

eZMediaType::objectAttributeContent ( objectAttribute)

Returns the content data for the given content object attribute.

Reimplemented from eZDataType.

Definition at line 644 of file ezmediatype.php.

eZMediaType::pluginPage ( mediaType) [static]

Returns plugin page by media type

Definition at line 261 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 55 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 693 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 720 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 585 of file ezmediatype.php.

eZMediaType::storeDefinedClassAttribute ( classAttribute)
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.

Reimplemented from eZDataType.

Definition at line 589 of file ezmediatype.php.

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

Extracts file information for the media entry.

Reimplemented from eZDataType.

Definition at line 573 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 376 of file ezmediatype.php.

eZMediaType::supportsBatchInitializeObjectAttribute ( )

Reimplemented from eZDataType.

Definition at line 814 of file ezmediatype.php.

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

Returns the object title.

Reimplemented from eZDataType.

Definition at line 621 of file ezmediatype.php.

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

Reimplemented from eZDataType.

Definition at line 664 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 89 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 710 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 759 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 593 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 197 of file ezmediatype.php.


Member Data Documentation

const eZMediaType::DATA_TYPE_STRING = "ezmedia"

Definition at line 40 of file ezmediatype.php.

const eZMediaType::MAX_FILESIZE_FIELD = 'data_int1'

Definition at line 41 of file ezmediatype.php.

const eZMediaType::MAX_FILESIZE_VARIABLE = '_ezmedia_max_filesize_'

Definition at line 42 of file ezmediatype.php.

const eZMediaType::TYPE_FIELD = "data_text1"

Definition at line 43 of file ezmediatype.php.

const eZMediaType::TYPE_VARIABLE = "_ezmedia_type_"

Definition at line 44 of file ezmediatype.php.


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