eZPublishCommunityProject  2013.6
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 ($path)
 Deletes the existing BinaryFile with path $path. More...
 
 exists ($path)
 Checks if the BinaryFile with path $path exists. More...
 
 getExternalPath ($path)
 Removes the internal storage path from $path. More...
 
 getFileContents ($uri)
 Returns the contents of the BinaryFile identified by $path. More...
 
 getFileResource ($uri)
 Returns a file resource to the BinaryFile identified by $path. More...
 
 getInternalPath ($path)
 Returns the internal, handler level path for $path. More...
 
 getMetadata (MetadataHandler $metadataHandler, $path)
 Executes $metadataHandler on $path, and returns the metadata array. More...
 
 load ($uri)
 Loads the BinaryFile identified by $path. More...
 
 update ($path, 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 (   $path)

Deletes the existing BinaryFile with path $path.

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

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::getExternalPath (   $path)

Removes the internal storage path from $path.

Parameters
string$path
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 (   $uri)

Returns the contents of the BinaryFile identified by $path.

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionif the file couldn't be found
Parameters
string$uri
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 (   $uri)

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$uri
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 (   $path)

Returns the internal, handler level path for $path.

Parameters
string$path
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::getMetadata ( MetadataHandler  $metadataHandler,
  $path 
)

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

Parameters
MetadataHandler$metadataHandler
string$path
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::load (   $uri)

Loads the BinaryFile identified by $path.

Exceptions
\eZ\Publish\Core\Base\Exceptions\NotFoundExceptionIf no file identified by $path exists
Parameters
string$uri
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 (   $path,
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$path
\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: