eZ Publish  [4.0]
eZImage Class Reference

The class eZImage handles registered images. More...

+ Inheritance diagram for eZImage:
+ Collaboration diagram for eZImage:

List of all members.

Public Member Functions

 attribute ($attr)
 attributes ()
 create ($contentObjectAttributeID, $contentObjectAttributeVersion)
 eZImage ($row)
 fetch ($id, $version=null, $asObject=true)
 fetchList ($asObject=true)
 hasAttribute ($attr)
 remove ($id, $version)

Static Public Member Functions

static definition ()

Public Attributes

 $ContentObjectAttributeID
 $Filename
 $MimeType
 $OriginalFilename
 $Version

Detailed Description

The class eZImage handles registered images.

Deprecated:

Definition at line 44 of file ezimage.php.


Member Function Documentation

eZImage::attribute ( attr)

Definition at line 126 of file ezimage.php.

eZImage::attributes ( )
Returns:
the attributes for this object, taken from the definition fields and function attributes.

Reimplemented from eZPersistentObject.

Definition at line 87 of file ezimage.php.

eZImage::create ( contentObjectAttributeID,
contentObjectAttributeVersion 
)

Definition at line 261 of file ezimage.php.

static eZImage::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 51 of file ezimage.php.

Referenced by fetch(), fetchList(), and remove().

eZImage::eZImage ( row)

Definition at line 46 of file ezimage.php.

Referenced by create().

eZImage::fetch ( id,
version = null,
asObject = true 
)
eZImage::fetchList ( asObject = true)

Definition at line 293 of file ezimage.php.

eZImage::hasAttribute ( attr)
Returns:
true if the attribute $attr is part of the definition fields or function attributes.

Reimplemented from eZPersistentObject.

Definition at line 92 of file ezimage.php.

eZImage::remove ( conditions,
extraConditions 
)

Removes the object from the database, it will use the keys in the object definition to figure out which table row should be removed unless $conditions is defined as an array with fieldnames. It uses removeObject to do the real job and passes the object defintion, conditions and extra conditions $extraConditions to this function.

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 eZPersistentObject.

Definition at line 300 of file ezimage.php.


Member Data Documentation

eZImage::$ContentObjectAttributeID

Definition at line 316 of file ezimage.php.

eZImage::$Filename

Definition at line 317 of file ezimage.php.

eZImage::$MimeType

Definition at line 319 of file ezimage.php.

eZImage::$OriginalFilename

Definition at line 318 of file ezimage.php.

eZImage::$Version

Definition at line 315 of file ezimage.php.


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