eZPublishCommunityProject  2012.12
eZ\Publish\Core\IO\InMemoryHandler Class Reference

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

+ Inheritance diagram for eZ\Publish\Core\IO\InMemoryHandler:
+ Collaboration diagram for eZ\Publish\Core\IO\InMemoryHandler:

Public Member Functions

 __construct (array $storage=array())
 
 create (BinaryFileCreateStruct $createFilestruct)
 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...
 
 getFileContents ($path)
 Returns the contents of the BinaryFile identified by $path. More...
 
 getFileResource ($path)
 Returns a file resource to the BinaryFile identified by $path. More...
 
 load ($path)
 Loads the BinaryFile identified by $path. More...
 
 update ($path, BinaryFileUpdateStruct $updateFileStruct)
 Updates the file identified by $path with data from $updateFile. More...
 

Private Attributes

 $data
 
 $storage
 

Detailed Description

Backend interface for handling of binary files I/O.

Constructor & Destructor Documentation

eZ\Publish\Core\IO\InMemoryHandler::__construct ( array  $storage = array())

Member Function Documentation

eZ\Publish\Core\IO\InMemoryHandler::create ( BinaryFileCreateStruct  $createFilestruct)

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$createFilestruct
Returns
The newly created BinaryFile object

Implements eZ\Publish\SPI\IO\Handler.

eZ\Publish\Core\IO\InMemoryHandler::delete (   $path)

Deletes the existing BinaryFile with path $path.

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

Implements eZ\Publish\SPI\IO\Handler.

eZ\Publish\Core\IO\InMemoryHandler::exists (   $path)

Checks if the BinaryFile with path $path exists.

Parameters
string$path
Returns
boolean

Implements eZ\Publish\SPI\IO\Handler.

eZ\Publish\Core\IO\InMemoryHandler::getFileContents (   $path)

Returns the contents of the BinaryFile identified by $path.

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

Implements eZ\Publish\SPI\IO\Handler.

eZ\Publish\Core\IO\InMemoryHandler::getFileResource (   $path)

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$path
Returns
resource

Implements eZ\Publish\SPI\IO\Handler.

eZ\Publish\Core\IO\InMemoryHandler::load (   $path)

Loads the BinaryFile identified by $path.

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

Implements eZ\Publish\SPI\IO\Handler.

eZ\Publish\Core\IO\InMemoryHandler::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

Implements eZ\Publish\SPI\IO\Handler.

Member Data Documentation

eZ\Publish\Core\IO\InMemoryHandler::$data
private
eZ\Publish\Core\IO\InMemoryHandler::$storage
private

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