eZPublishCommunityProject  2012.12
eZ\Publish\Core\Repository\IOService Class Reference
+ Inheritance diagram for eZ\Publish\Core\Repository\IOService:
+ Collaboration diagram for eZ\Publish\Core\Repository\IOService:

Public Member Functions

 __construct (RepositoryInterface $repository, Handler $handler, array $settings=array())
 Setups service with reference to repository object that created it & corresponding handler. More...
 
 createBinaryFile (BinaryFileCreateStruct $binaryFileCreateStruct)
 Creates a binary file in the repository. More...
 
 deleteBinaryFile (BinaryFile $binaryFile)
 Deletes the BinaryFile with $path. More...
 
 getFileContents (BinaryFile $binaryFile)
 Returns the content of the binary file. More...
 
 getFileInputStream (BinaryFile $binaryFile)
 Returns a read (mode: rb) file resource to the binary file identified by $path. More...
 
 loadBinaryFile ($binaryFileid)
 Loads the binary file with $id. More...
 
 newBinaryCreateStructFromLocalFile ($localFile)
 Creates a BinaryFileCreateStruct object from $localFile. More...
 
 newBinaryCreateStructFromUploadedFile (array $uploadedFile)
 Creates a BinaryFileCreateStruct object from the uploaded file $uploadedFile. More...
 
 setLegacyKernel (LegacyKernel $legacyKernel)
 Injects the legacy kernel instance. More...
 
- Public Member Functions inherited from eZ\Publish\Core\MVC\Legacy\LegacyKernelAware
 setLegacyKernel (Kernel $legacyKernel)
 Injects the legacy kernel instance. More...
 

Protected Member Functions

 buildDomainBinaryFileObject (SPIBinaryFile $spiBinaryFile)
 Generates API BinaryFile object from provided SPI BinaryFile object. More...
 
 buildSPIBinaryFileCreateStructObject (BinaryFileCreateStruct $binaryFileCreateStruct)
 Generates SPI BinaryFileCreateStruct object from provided API BinaryFileCreateStruct object. More...
 
 getLegacyKernel ()
 Gets the legacy kernel instance. More...
 

Protected Attributes

 $ioHandler
 
 $legacyKernel
 
 $repository
 
 $settings
 

Constructor & Destructor Documentation

eZ\Publish\Core\Repository\IOService::__construct ( RepositoryInterface  $repository,
Handler  $handler,
array  $settings = array() 
)

Setups service with reference to repository object that created it & corresponding handler.

Parameters
\eZ\Publish\API\Repository\Repository$repository
\eZ\Publish\SPI\IO\Handler$handler
array$settings

Member Function Documentation

eZ\Publish\Core\Repository\IOService::buildDomainBinaryFileObject ( SPIBinaryFile  $spiBinaryFile)
protected

Generates API BinaryFile object from provided SPI BinaryFile object.

Parameters
\eZ\Publish\SPI\IO\BinaryFile$spiBinaryFile
Returns

Referenced by eZ\Publish\Core\Repository\IOService\createBinaryFile(), and eZ\Publish\Core\Repository\IOService\loadBinaryFile().

eZ\Publish\Core\Repository\IOService::buildSPIBinaryFileCreateStructObject ( BinaryFileCreateStruct  $binaryFileCreateStruct)
protected

Generates SPI BinaryFileCreateStruct object from provided API BinaryFileCreateStruct object.

Parameters
\eZ\Publish\API\Repository\Values\IO\BinaryFileCreateStruct$binaryFileCreateStruct
Returns

Referenced by eZ\Publish\Core\Repository\IOService\createBinaryFile().

eZ\Publish\Core\Repository\IOService::createBinaryFile ( BinaryFileCreateStruct  $binaryFileCreateStruct)

Creates a binary file in the repository.

Parameters
\eZ\Publish\API\Repository\Values\IO\BinaryFileCreateStruct$binaryFileCreateStruct
Returns
The created BinaryFile object

Implements eZ\Publish\API\Repository\IOService.

eZ\Publish\Core\Repository\IOService::deleteBinaryFile ( BinaryFile  $binaryFile)

Deletes the BinaryFile with $path.

Parameters
\eZ\Publish\API\Repository\Values\IO\BinaryFile$binaryFile

Implements eZ\Publish\API\Repository\IOService.

eZ\Publish\Core\Repository\IOService::getFileContents ( BinaryFile  $binaryFile)

Returns the content of the binary file.

Parameters
\eZ\Publish\API\Repository\Values\IO\BinaryFile$binaryFile
Returns
string

Implements eZ\Publish\API\Repository\IOService.

eZ\Publish\Core\Repository\IOService::getFileInputStream ( BinaryFile  $binaryFile)

Returns a read (mode: rb) file resource to the binary file identified by $path.

Parameters
\eZ\Publish\API\Repository\Values\IO\BinaryFile$binaryFile
Returns
resource

Implements eZ\Publish\API\Repository\IOService.

eZ\Publish\Core\Repository\IOService::getLegacyKernel ( )
protected

Gets the legacy kernel instance.

Returns
eZ\Publish\Core\Repository\IOService::loadBinaryFile (   $binaryFileid)

Loads the binary file with $id.

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundException
Parameters
string$binaryFileid
Returns

Implements eZ\Publish\API\Repository\IOService.

eZ\Publish\Core\Repository\IOService::newBinaryCreateStructFromLocalFile (   $localFile)

Creates a BinaryFileCreateStruct object from $localFile.

Exceptions
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionWhen given a non existing / unreadable file
Parameters
string$localFilePath to local file
Returns

Implements eZ\Publish\API\Repository\IOService.

eZ\Publish\Core\Repository\IOService::newBinaryCreateStructFromUploadedFile ( array  $uploadedFile)

Creates a BinaryFileCreateStruct object from the uploaded file $uploadedFile.

Exceptions
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionWhen given an invalid uploaded file
Parameters
array$uploadedFileThe $_POST hash of an uploaded file
Returns

Implements eZ\Publish\API\Repository\IOService.

eZ\Publish\Core\Repository\IOService::setLegacyKernel ( LegacyKernel  $legacyKernel)

Injects the legacy kernel instance.

Parameters
\eZ\Publish\Core\MVC\Legacy\Kernel$legacyKernel
Returns
void

Member Data Documentation

eZ\Publish\Core\Repository\IOService::$ioHandler
protected
eZ\Publish\Core\Repository\IOService::$legacyKernel
protected
eZ\Publish\Core\Repository\IOService::$repository
protected
eZ\Publish\Core\Repository\IOService::$settings
protected

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