eZPublishCommunityProject  2013.9
eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage Class Reference
+ Inheritance diagram for eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage:
+ Collaboration diagram for eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage:

Public Member Functions

 countFileReferences (array $files)
 Returns a map with the number of references each file from $files has. More...
 
 getFileReferenceData ($fieldId, $versionNo)
 Returns the file reference data for the given $fieldId in $versionNo. More...
 
 getReferencedFiles (array $fieldIds, $versionNo)
 Returns a set o file references, referenced by the given $fieldIds. More...
 
 prependMimeToPath ($path, $mimeType)
 Prepends $path with the first part of the given $mimeType. More...
 
 removeFileReference ($fieldId, $versionNo)
 Removes a specific file reference for $fieldId and $versionId. More...
 
 removeFileReferences (array $fieldIds, $versionNo)
 Removes all file references for the given $fieldIds. More...
 
 removeMimeFromPath ($path)
 Removes the prepended mime-type directory from $path for legacy storage. More...
 
 setConnection ($dbHandler)
 Set database handler for this gateway. More...
 
 storeFileReference (VersionInfo $versionInfo, Field $field)
 Stores the file reference in $field for $versionNo. More...
 
- Public Member Functions inherited from eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway
 countFileReferences (array $files)
 Returns a map with the number of references each file from $files has. More...
 
 getFileReferenceData ($fieldId, $versionNo)
 Returns the file reference data for the given $fieldId in $versionNo. More...
 
 getReferencedFiles (array $fieldIds, $versionNo)
 Returns a map of files referenced by the given $fieldIds. More...
 
 removeFileReference ($fieldId, $versionNo)
 Removes a specific file reference for $fieldId and $versionId. More...
 
 removeFileReferences (array $fieldIds, $versionNo)
 Removes all file references for the given $fieldIds. More...
 
 storeFileReference (VersionInfo $versionInfo, Field $field)
 Stores the file reference in $field for $versionNo. More...
 
- Public Member Functions inherited from eZ\Publish\Core\FieldType\StorageGateway
 setConnection ($connection)
 Sets the data storage connection to use. More...
 

Protected Member Functions

 castToPropertyValue ($value, $columnName)
 Returns $value casted as specified by getPropertyMapping(). More...
 
 getConnection ()
 Returns the active connection. More...
 
 getPropertyMapping ()
 Returns a column to property mapping for the storage table. More...
 
 getStorageTable ()
 Returns the table name to store data in. More...
 
 setFetchColumns (\ezcQuerySelect $selectQuery, $fieldId, $versionNo)
 Set columns to be fetched from the database. More...
 
 setInsertColumns (\ezcQueryInsert $insertQuery, VersionInfo $versionInfo, Field $field)
 Sets the required insert columns to $selectQuery. More...
 
 toPropertyName ($columnName)
 Returns the property name for the given $columnName. More...
 

Protected Attributes

 $dbHandler
 

Member Function Documentation

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::castToPropertyValue (   $value,
  $columnName 
)
protected

Returns $value casted as specified by getPropertyMapping().

Parameters
mixed$value
string$columnName
Returns
mixed

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage\getFileReferenceData().

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::countFileReferences ( array  $files)

Returns a map with the number of references each file from $files has.

Parameters
array$files
Returns
array
eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::getFileReferenceData (   $fieldId,
  $versionNo 
)

Returns the file reference data for the given $fieldId in $versionNo.

Parameters
mixed$fieldId
int$versionNo
Returns
array|void
eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::getPropertyMapping ( )
protected
eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::getReferencedFiles ( array  $fieldIds,
  $versionNo 
)

Returns a set o file references, referenced by the given $fieldIds.

Parameters
array$fieldIds
Returns
array
eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::getStorageTable ( )
abstractprotected

Returns the table name to store data in.

Returns
string
eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::prependMimeToPath (   $path,
  $mimeType 
)

Prepends $path with the first part of the given $mimeType.

Parameters
string$path
string$mimeType
Returns
string

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage\countFileReferences(), and eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage\getFileReferenceData().

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::removeFileReference (   $fieldId,
  $versionNo 
)

Removes a specific file reference for $fieldId and $versionId.

Parameters
mixed$fieldId
int$versionNo
Returns
void
eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::removeFileReferences ( array  $fieldIds,
  $versionNo 
)

Removes all file references for the given $fieldIds.

Parameters
array$fieldIds
Returns
void
eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::removeMimeFromPath (   $path)

Removes the prepended mime-type directory from $path for legacy storage.

Parameters
string$path
Returns
string

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage\setInsertColumns().

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::setConnection (   $dbHandler)

Set database handler for this gateway.

Parameters
mixed$dbHandler
Returns
void
Exceptions
\RuntimeExceptionif $dbHandler is not an instance of eZ\Publish\Core\Persistence\Legacy\EzcDbHandler
eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::setFetchColumns ( \ezcQuerySelect  $selectQuery,
  $fieldId,
  $versionNo 
)
protected

Set columns to be fetched from the database.

This method is intended to be overwritten by derived classes in order to add additional columns to be fetched from the database. Please do not forget to call the parent when overwriting this method.

Parameters
\ezcQuerySelect$selectQuery
int$fieldId
int$versionNo
Returns
void

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage\getFileReferenceData().

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::setInsertColumns ( \ezcQueryInsert  $insertQuery,
VersionInfo  $versionInfo,
Field  $field 
)
protected

Sets the required insert columns to $selectQuery.

This method is intended to be overwritten by derived classes in order to add additional columns to be set in the database. Please do not forget to call the parent when overwriting this method.

Parameters
\ezcQueryInsert$insertQuery
VersionInfo$versionInfo
Field$field
Returns
void

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage\storeFileReference().

eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::storeFileReference ( VersionInfo  $versionInfo,
Field  $field 
)

Stores the file reference in $field for $versionNo.

Parameters
VersionInfo$versionInfo
Field$field
Returns
void
eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::toPropertyName (   $columnName)
protected

Returns the property name for the given $columnName.

Parameters
string$columnName
Returns
string

Referenced by eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage\getFileReferenceData().

Member Data Documentation


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