Interface

eZ\Publish\Core\IO\IOBinarydataHandler

interface IOBinarydataHandler

Provides reading & writing of files binary data.

Methods

create(BinaryFileCreateStruct $binaryFileCreateStruct)

Creates a new file with data from $binaryFileCreateStruct.

delete(string $spiBinaryFileId)

Deletes the file $path.

string getContents($spiBinaryFileId $spiBinaryFileId)

Returns the binary content from $path.

resource getResource(string $spiBinaryFileId)

Returns a read-only, binary file resource to $path.

string getUri(string $spiBinaryFileId)

Returns the public URI for $path.

string getIdFromUri(string $binaryFileUri)

Returns the id in $binaryFileUri.

deleteDirectory(string $spiPath)

Deletes the directory $spiPath and all of its contents.

Details

at line 26
public create(BinaryFileCreateStruct $binaryFileCreateStruct)

Creates a new file with data from $binaryFileCreateStruct.

Parameters

BinaryFileCreateStruct $binaryFileCreateStruct

Exceptions

RuntimeException if an error occured creating the file

at line 35
public delete(string $spiBinaryFileId)

Deletes the file $path.

Parameters

string $spiBinaryFileId

Exceptions

BinaryFileNotFoundException If the file is not found

at line 46
public string getContents($spiBinaryFileId $spiBinaryFileId)

Returns the binary content from $path.

Parameters

$spiBinaryFileId $spiBinaryFileId

Return Value

string

Exceptions

BinaryFileNotFoundException If $path is not found

at line 55
public resource getResource(string $spiBinaryFileId)

Returns a read-only, binary file resource to $path.

Parameters

string $spiBinaryFileId

Return Value

resource A read-only binary resource to $path

at line 64
public string getUri(string $spiBinaryFileId)

Returns the public URI for $path.

Parameters

string $spiBinaryFileId

Return Value

string

at line 73
public string getIdFromUri(string $binaryFileUri)

Returns the id in $binaryFileUri.

Parameters

string $binaryFileUri

Return Value

string

at line 80
public deleteDirectory(string $spiPath)

Deletes the directory $spiPath and all of its contents.

Parameters

string $spiPath