PHP Class eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage

Inheritance: extends eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway
Afficher le fichier Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Свойство Type Description
$dbHandler mixed Connection.

Méthodes publiques

Méthode Description
countFileReferences ( array $files ) : array Returns a map with the number of references each file from $files has.
getFileReferenceData ( mixed $fieldId, integer $versionNo ) : array | void Returns the file reference data for the given $fieldId in $versionNo.
getReferencedFiles ( array $fieldIds, $versionNo ) : array Returns a set o file references, referenced by the given $fieldIds.
prependMimeToPath ( string $path, string $mimeType ) : string Prepends $path with the first part of the given $mimeType.
removeFileReference ( mixed $fieldId, integer $versionNo ) Removes a specific file reference for $fieldId and $versionId.
removeFileReferences ( array $fieldIds, $versionNo ) Removes all file references for the given $fieldIds.
removeMimeFromPath ( string $path ) : string Removes the prepended mime-type directory from $path for legacy storage.
setConnection ( mixed $dbHandler ) Set database handler for this gateway.
storeFileReference ( eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo, eZ\Publish\SPI\Persistence\Content\Field $field ) Stores the file reference in $field for $versionNo.

Méthodes protégées

Méthode Description
castToPropertyValue ( mixed $value, string $columnName ) : mixed Returns $value casted as specified by {@link getPropertyMapping()}.
getConnection ( ) : eZ\Publish\Core\Persistence\Database\DatabaseHandler Returns the active connection.
getPropertyMapping ( ) : array Returns a column to property mapping for the storage table.
getStorageTable ( ) : string Returns the table name to store data in.
setFetchColumns ( eZ\Publish\Core\Persistence\Database\SelectQuery $selectQuery, integer $fieldId, integer $versionNo ) Set columns to be fetched from the database.
setInsertColumns ( eZ\Publish\Core\Persistence\Database\InsertQuery $insertQuery, eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo, eZ\Publish\SPI\Persistence\Content\Field $field ) Sets the required insert columns to $selectQuery.
toPropertyName ( string $columnName ) : string Returns the property name for the given $columnName.

Method Details

castToPropertyValue() protected méthode

Returns $value casted as specified by {@link getPropertyMapping()}.
protected castToPropertyValue ( mixed $value, string $columnName ) : mixed
$value mixed
$columnName string
Résultat mixed

countFileReferences() public méthode

Returns a map with the number of references each file from $files has.
public countFileReferences ( array $files ) : array
$files array
Résultat array

getConnection() protected méthode

Returns the active connection.
protected getConnection ( ) : eZ\Publish\Core\Persistence\Database\DatabaseHandler
Résultat eZ\Publish\Core\Persistence\Database\DatabaseHandler

getFileReferenceData() public méthode

Returns the file reference data for the given $fieldId in $versionNo.
public getFileReferenceData ( mixed $fieldId, integer $versionNo ) : array | void
$fieldId mixed
$versionNo integer
Résultat array | void

getPropertyMapping() protected méthode

Returns a column to property mapping for the storage table.
protected getPropertyMapping ( ) : array
Résultat array

getReferencedFiles() public méthode

Returns a set o file references, referenced by the given $fieldIds.
public getReferencedFiles ( array $fieldIds, $versionNo ) : array
$fieldIds array
Résultat array

getStorageTable() abstract protected méthode

Returns the table name to store data in.
abstract protected getStorageTable ( ) : string
Résultat string

prependMimeToPath() public méthode

Prepends $path with the first part of the given $mimeType.
public prependMimeToPath ( string $path, string $mimeType ) : string
$path string
$mimeType string
Résultat string

removeFileReference() public méthode

Removes a specific file reference for $fieldId and $versionId.
public removeFileReference ( mixed $fieldId, integer $versionNo )
$fieldId mixed
$versionNo integer

removeFileReferences() public méthode

Removes all file references for the given $fieldIds.
public removeFileReferences ( array $fieldIds, $versionNo )
$fieldIds array

removeMimeFromPath() public méthode

Removes the prepended mime-type directory from $path for legacy storage.
public removeMimeFromPath ( string $path ) : string
$path string
Résultat string

setConnection() public méthode

Set database handler for this gateway.
public setConnection ( mixed $dbHandler )
$dbHandler mixed

setFetchColumns() protected méthode

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.
protected setFetchColumns ( eZ\Publish\Core\Persistence\Database\SelectQuery $selectQuery, integer $fieldId, integer $versionNo )
$selectQuery eZ\Publish\Core\Persistence\Database\SelectQuery
$fieldId integer
$versionNo integer

setInsertColumns() protected méthode

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.
protected setInsertColumns ( eZ\Publish\Core\Persistence\Database\InsertQuery $insertQuery, eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo, eZ\Publish\SPI\Persistence\Content\Field $field )
$insertQuery eZ\Publish\Core\Persistence\Database\InsertQuery
$versionInfo eZ\Publish\SPI\Persistence\Content\VersionInfo
$field eZ\Publish\SPI\Persistence\Content\Field

storeFileReference() public méthode

Stores the file reference in $field for $versionNo.
public storeFileReference ( eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo, eZ\Publish\SPI\Persistence\Content\Field $field )
$versionInfo eZ\Publish\SPI\Persistence\Content\VersionInfo
$field eZ\Publish\SPI\Persistence\Content\Field

toPropertyName() protected méthode

Returns the property name for the given $columnName.
protected toPropertyName ( string $columnName ) : string
$columnName string
Résultat string

Property Details

$dbHandler protected_oe property

Connection.
protected mixed $dbHandler
Résultat mixed