PHP Class eZ\Publish\Core\FieldType\Image\ImageStorage\Gateway\LegacyStorage

Inheritance: extends eZ\Publish\Core\FieldType\Image\ImageStorage\Gateway
Datei anzeigen Open project: ezsystems/ezpublish-kernel

Protected Properties

Property Type Description
$dbHandler mixed Connection.
$fieldNameMap array Maps database field names to property names.

Public Methods

Method Description
__construct ( eZ\Publish\Core\IO\UrlRedecorator $redecorator )
countImageReferences ( string $uri ) : integer Returns the number of recorded references to the given $path.
extractFilesFromXml ( $xml )
getNodePathString ( eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo ) : string Returns the node path string of $versionInfo.
getXmlForImages ( integer $versionNo, array $fieldIds ) : array Returns a the XML content stored for the given $fieldIds.
removeImageReferences ( string $uri, integer $versionNo, mixed $fieldId ) Removes all references from $fieldId to a path that starts with $path.
setConnection ( mixed $dbHandler ) Set database handler for this gateway.
storeImageReference ( string $uri, mixed $fieldId ) Stores a reference to the image in $path for $fieldId.

Protected Methods

Method Description
canRemoveImageReference ( string $path, integer $versionNo, mixed $fieldId ) : boolean Checks if image $path can be removed when deleting $versionNo and $fieldId.
getConnection ( ) : eZ\Publish\Core\Persistence\Database\DatabaseHandler Returns the active connection.

Method Details

__construct() public method

public __construct ( eZ\Publish\Core\IO\UrlRedecorator $redecorator )
$redecorator eZ\Publish\Core\IO\UrlRedecorator

canRemoveImageReference() protected method

Checks if image $path can be removed when deleting $versionNo and $fieldId.
protected canRemoveImageReference ( string $path, integer $versionNo, mixed $fieldId ) : boolean
$path string legacy image path (var/storage/images...)
$versionNo integer
$fieldId mixed
return boolean

countImageReferences() public method

Returns the number of recorded references to the given $path.
public countImageReferences ( string $uri ) : integer
$uri string File IO uri (not legacy)
return integer

extractFilesFromXml() public method

public extractFilesFromXml ( $xml )

getConnection() protected method

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

getNodePathString() public method

Returns the node path string of $versionInfo.
public getNodePathString ( eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo ) : string
$versionInfo eZ\Publish\SPI\Persistence\Content\VersionInfo
return string

getXmlForImages() public method

Returns a the XML content stored for the given $fieldIds.
public getXmlForImages ( integer $versionNo, array $fieldIds ) : array
$versionNo integer
$fieldIds array
return array

removeImageReferences() public method

Removes all references from $fieldId to a path that starts with $path.
public removeImageReferences ( string $uri, integer $versionNo, mixed $fieldId )
$uri string File IO uri (not legacy)
$versionNo integer
$fieldId mixed

setConnection() public method

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

storeImageReference() public method

Stores a reference to the image in $path for $fieldId.
public storeImageReference ( string $uri, mixed $fieldId )
$uri string File IO uri (not legacy)
$fieldId mixed

Property Details

$dbHandler protected_oe property

Connection.
protected mixed $dbHandler
return mixed

$fieldNameMap protected_oe property

Maps database field names to property names.
protected array $fieldNameMap
return array