File/LobAccess.php

Show: inherited
Table of Contents

\Conjoon_File_LobAccess

Package: Default

Parent(s)
\Conjoon_Data_LobAccess
Author
Thorsten Suckow-Homberg  

Constants

Constant  OP_MOVE = 1
Constant  OP_COPY = 2

Properties

Propertyprotected  $_filePointers= 'array()'
Default valuearray()Details
Type
n/a

Methods

methodpublic__destruct( ) : void

methodprotected_moveOrCopyLob(  $data,  $type ) : void

Parameters
Name Type Description
$data
$type
methodprotected_sanitizePath(  $path ) : void

Parameters
Name Type Description
$path
methodpublicaddLob( array $data ) : string

Saves the lob specified in $data The following properties must exist in $data - path The complete path to the new lob that should get created - resource The content for this lob. Can be a resource or a string

Parameters
Name Type Description
$data array
Returns
Type Description
string The path to the newly created lob, or null if not successfull
Throws
Exception Description
\Conjoon_Data_Exception
methodpublicaddLobFromStream( array $data ) : mixed

Adds the lob from a stream.

  • path the target path
  • resource the source resource
Parameters
Name Type Description
$data array
Returns
Type Description
mixed a unique identifier for this lob, or null
Throws
Exception Description
\Conjoon_Data_Exception
Details
See
\isStreamWritingSupported  
methodpubliccopyLob( array $data ) : mixed

Copies a Lob.

The following properties must be available in the $data array. - from The complete path including the filename that should be copied - to The destination path - name The destination file name

Parameters
Name Type Description
$data array
Returns
Type Description
mixed the filename including the path of the copied file, otherwise null
Throws
Exception Description
\Conjoon_Data_Exception
methodpublicdeleteLob( array $data ) : bool

Deletes a lob.

The following properties have to be available in $data: - path The path to the LOB that should be removed

Parameters
Name Type Description
$data array
Returns
Type Description
bool true on success, otherwise false
Throws
Exception Description
\Conjoon_Data_Exception
methodpublicdeleteLobForId( string $path ) : bool

Deletes a lob for an id.

The id would be the path of the file to delete.

Parameters
Name Type Description
$path string
Returns
Type Description
bool true on success, otherwise false
Throws
Exception Description
\Conjoon_Data_Exception
methodpublicgetLobAsStream( array $data ) : resource | null

Returns a stream resource for a lob.

The following properties must exist in $data: - path The complete path to the lob

Parameters
Name Type Description
$data array
Returns
Type Description
resource | null
Throws
Exception Description
\Conjoon_Data_Exception
Details
See
\isStreamAccessSupported  
methodpublicgetLobContent( array $data ) : string

Returns the lob's content.

The following properties have to be available in $data: - path the full path to the lob

Parameters
Name Type Description
$data array
Returns
Type Description
string
Throws
Exception Description
\Conjoon_Data_Exception
methodpublicgetLobData( array $data ) : array

Returns the meta data for the lob.

The following properties must exist in $data: - path The complete path to the lob - includeResource optional, if the lob should be returned as a string, too

Parameters
Name Type Description
$data array
Returns
Type Description
array An array with the following properties: - dirname - basename - extension - filename - resource with the plain content of the lob, if includeResource was set to true or null if the path was not valid
Throws
Exception Description
\Conjoon_Data_Exception
methodpublicisStreamAccessSupported( ) : bool

Returns true if this class is capable of returning a lob as a stream, otherwise false

Returns
Type Description
bool
methodpublicisStreamWritingSupported( ) : bool

Returns true if this class is capable of writing a lob as a stream, otherwise false

Returns
Type Description
bool
methodpublicmoveLob( array $data ) : mixed

Moves a Lob.

The following properties must be available in the $data array. - from The complete path including the filename that should be copied - to The destination path - name The destination file name

Parameters
Name Type Description
$data array
Returns
Type Description
mixed a unique identifier for this moved lob, otherwise null
Throws
Exception Description
\Conjoon_Data_Exception
methodpublicsetLobName( array $data ) : bool

Sets the name for a lob.

The following properties have to be available in $data path - the path to the lob that has to be renamed name - the new name for the lob, without the path

Parameters
Name Type Description
$data array
Returns
Type Description
bool true on success, otherwise false
Throws
Exception Description
\Conjoon_Data_Exception
Documentation was generated by DocBlox 0.18.1.