eZPublishCommunityProject  2013.9
eZ\Publish\Core\IO\Handler Interface Reference

Backend interface for handling of binary files I/O. More...

+ Inheritance diagram for eZ\Publish\Core\IO\Handler:

Public Member Functions

 create (BinaryFileCreateStruct $createStruct)
 Creates and stores a new BinaryFile based on the BinaryFileCreateStruct $file. More...
 
 delete ($spiBinaryFileId)
 Deletes the existing BinaryFile with path $path. More...
 
 exists ($spiBinaryFileId)
 Checks if the BinaryFile with path $path exists. More...
 
 getExternalPath ($apiBinaryFileId)
 Removes the internal storage path from $path. More...
 
 getFileContents ($spiBinaryFileId)
 Returns the contents of the BinaryFile identified by $path. More...
 
 getFileResource ($spiBinaryFileId)
 Returns a file resource to the BinaryFile identified by $path. More...
 
 getInternalPath ($spiBinaryFileId)
 Returns the internal, handler level path from the api level $binaryFileId. More...
 
 getMetadata (MetadataHandler $metadataHandler, $spiBinaryFileId)
 Executes $metadataHandler on $path, and returns the metadata array. More...
 
 getUri ($spiBinaryFileId)
 Returns the file's public HTTP URI, as exposed from the outside. More...
 
 load ($spiBinaryFileId)
 Loads the BinaryFile identified by $path. More...
 
 update ($spiBinaryFileId, BinaryFileUpdateStruct $updateFileStruct)
 Updates the file identified by $path with data from $updateFile. More...
 

Detailed Description

Backend interface for handling of binary files I/O.

Member Function Documentation

eZ\Publish\Core\IO\Handler::create ( BinaryFileCreateStruct  $createStruct)

Creates and stores a new BinaryFile based on the BinaryFileCreateStruct $file.

Exceptions
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionIf the target path already exists
Parameters
\eZ\Publish\SPI\IO\BinaryFileCreateStruct$createStruct
Returns
The newly created BinaryFile object
eZ\Publish\Core\IO\Handler::delete (   $spiBinaryFileId)

Deletes the existing BinaryFile with path $path.

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionIf the file doesn't exist
Parameters
string$spiBinaryFileId

Implemented in eZ\Publish\Core\IO\Handler\Legacy, eZ\Publish\Core\IO\Handler\Filesystem, eZ\Publish\Core\IO\Handler\Dispatcher, and eZ\Publish\Core\IO\Handler\InMemory.

eZ\Publish\Core\IO\Handler::exists (   $spiBinaryFileId)
eZ\Publish\Core\IO\Handler::getExternalPath (   $apiBinaryFileId)

Removes the internal storage path from $path.

Parameters
string$apiBinaryFileId
Returns
string

Implemented in eZ\Publish\Core\IO\Handler\Legacy, eZ\Publish\Core\IO\Handler\Filesystem, eZ\Publish\Core\IO\Handler\Dispatcher, and eZ\Publish\Core\IO\Handler\InMemory.

eZ\Publish\Core\IO\Handler::getFileContents (   $spiBinaryFileId)

Returns the contents of the BinaryFile identified by $path.

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionif the file couldn't be found
Parameters
string$spiBinaryFileId
Returns
string

Implemented in eZ\Publish\Core\IO\Handler\Legacy, eZ\Publish\Core\IO\Handler\Filesystem, eZ\Publish\Core\IO\Handler\InMemory, and eZ\Publish\Core\IO\Handler\Dispatcher.

eZ\Publish\Core\IO\Handler::getFileResource (   $spiBinaryFileId)

Returns a file resource to the BinaryFile identified by $path.

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionIf no file identified by $path exists
Parameters
string$spiBinaryFileId
Returns
resource

Implemented in eZ\Publish\Core\IO\Handler\Legacy, eZ\Publish\Core\IO\Handler\Filesystem, eZ\Publish\Core\IO\Handler\InMemory, and eZ\Publish\Core\IO\Handler\Dispatcher.

eZ\Publish\Core\IO\Handler::getInternalPath (   $spiBinaryFileId)

Returns the internal, handler level path from the api level $binaryFileId.

Parameters
string$spiBinaryFileId
Returns
string

Implemented in eZ\Publish\Core\IO\Handler\Legacy, eZ\Publish\Core\IO\Handler\Filesystem, eZ\Publish\Core\IO\Handler\Dispatcher, and eZ\Publish\Core\IO\Handler\InMemory.

Referenced by eZ\Publish\Core\IO\Handler\Legacy\getUri().

eZ\Publish\Core\IO\Handler::getMetadata ( MetadataHandler  $metadataHandler,
  $spiBinaryFileId 
)

Executes $metadataHandler on $path, and returns the metadata array.

Parameters
MetadataHandler$metadataHandler
string$spiBinaryFileId
Returns
array

Implemented in eZ\Publish\Core\IO\Handler\Filesystem, eZ\Publish\Core\IO\Handler\Dispatcher, and eZ\Publish\Core\IO\Handler\InMemory.

eZ\Publish\Core\IO\Handler::getUri (   $spiBinaryFileId)

Returns the file's public HTTP URI, as exposed from the outside.

Deprecated:
should not be required. Seek & destroy.
Parameters
string$spiBinaryFileId
Returns
string

Implemented in eZ\Publish\Core\IO\Handler\Legacy, eZ\Publish\Core\IO\Handler\Filesystem, eZ\Publish\Core\IO\Handler\Dispatcher, and eZ\Publish\Core\IO\Handler\InMemory.

Referenced by eZ\Publish\Core\IO\Handler\Legacy\load().

eZ\Publish\Core\IO\Handler::load (   $spiBinaryFileId)

Loads the BinaryFile identified by $path.

Exceptions
\eZ\Publish\Core\Base\Exceptions\NotFoundExceptionIf no file identified by $path exists
Parameters
string$spiBinaryFileId
Returns

Implemented in eZ\Publish\Core\IO\Handler\Legacy, eZ\Publish\Core\IO\Handler\Filesystem, eZ\Publish\Core\IO\Handler\InMemory, and eZ\Publish\Core\IO\Handler\Dispatcher.

eZ\Publish\Core\IO\Handler::update (   $spiBinaryFileId,
BinaryFileUpdateStruct  $updateFileStruct 
)

Updates the file identified by $path with data from $updateFile.

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionIf the source path doesn't exist
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionIf the target path already exists
Parameters
string$spiBinaryFileId
\eZ\Publish\SPI\IO\BinaryFileUpdateStruct$updateFileStruct
Returns
The updated BinaryFile

Implemented in eZ\Publish\Core\IO\Handler\Legacy, eZ\Publish\Core\IO\Handler\Filesystem, eZ\Publish\Core\IO\Handler\Dispatcher, and eZ\Publish\Core\IO\Handler\InMemory.


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