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

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

Protected Properties

Property Type Description
$dbHandler mixed Connection.

Public Methods

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

Protected Methods

Method 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 method

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

countFileReferences() public method

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

getConnection() protected method

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

getFileReferenceData() public method

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

getPropertyMapping() protected method

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

getReferencedFiles() public method

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

getStorageTable() abstract protected method

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

prependMimeToPath() public method

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

removeFileReference() public method

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

removeFileReferences() public method

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

removeMimeFromPath() public method

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

setConnection() public method

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

setFetchColumns() protected method

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 method

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 method

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 method

Returns the property name for the given $columnName.
protected toPropertyName ( string $columnName ) : string
$columnName string
return string

Property Details

$dbHandler protected_oe property

Connection.
protected mixed $dbHandler
return mixed