eZPublishCommunityProject  2013.9
eZ\Publish\Core\REST\Client\IOService Class Reference
+ Inheritance diagram for eZ\Publish\Core\REST\Client\IOService:
+ Collaboration diagram for eZ\Publish\Core\REST\Client\IOService:

Public Member Functions

 __construct (HttpClient $client, Dispatcher $inputDispatcher, Visitor $outputVisitor, RequestParser $requestParser)
 
 createBinaryFile (BinaryFileCreateStruct $binaryFileCreateStruct)
 Creates a binary file in the 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...
 
 setSession ($id)
 Set session ID. More...
 

Private Attributes

 $client
 
 $inputDispatcher
 
 $outputVisitor
 
 $requestParser
 

Constructor & Destructor Documentation

eZ\Publish\Core\REST\Client\IOService::__construct ( HttpClient  $client,
Dispatcher  $inputDispatcher,
Visitor  $outputVisitor,
RequestParser  $requestParser 
)
Parameters
\eZ\Publish\Core\REST\Client\HttpClient$client
\eZ\Publish\Core\REST\Common\Input\Dispatcher$inputDispatcher
\eZ\Publish\Core\REST\Common\Output\Visitor$outputVisitor
\eZ\Publish\Core\REST\Common\RequestParser$requestParser

Member Function Documentation

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

Creates a binary file in the the repository.

Parameters
\eZ\Publish\Core\IO\Values\BinaryFileCreateStruct$binaryFileCreateStruct
Returns
The created BinaryFile object
eZ\Publish\Core\REST\Client\IOService::deleteBinaryFile ( BinaryFile  $binaryFile)

Deletes the BinaryFile with $path.

Parameters
\eZ\Publish\Core\IO\Values\BinaryFile$binaryFile
eZ\Publish\Core\REST\Client\IOService::getFileContents ( BinaryFile  $binaryFile)

Returns the content of the binary file.

Parameters
\eZ\Publish\Core\IO\Values\BinaryFile$binaryFile
Returns
string
eZ\Publish\Core\REST\Client\IOService::getFileInputStream ( BinaryFile  $binaryFile)

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

Parameters
\eZ\Publish\Core\IO\Values\BinaryFile$binaryFile
Returns
resource
eZ\Publish\Core\REST\Client\IOService::loadBinaryFile (   $binaryFileId)

Loads the binary file with $id.

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundException
Parameters
string$binaryFileid
Returns
eZ\Publish\Core\REST\Client\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
eZ\Publish\Core\REST\Client\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
eZ\Publish\Core\REST\Client\IOService::setSession (   $id)

Set session ID.

Only for testing

Parameters
mixedtringid
Returns
void

Implements eZ\Publish\Core\REST\Client\Sessionable.

Member Data Documentation

eZ\Publish\Core\REST\Client\IOService::$client
private
eZ\Publish\Core\REST\Client\IOService::$inputDispatcher
private
eZ\Publish\Core\REST\Client\IOService::$outputVisitor
private
eZ\Publish\Core\REST\Client\IOService::$requestParser
private

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