File/LobAccess.php
\Conjoon_File_LobAccess
- Parent(s)
- \Conjoon_Data_LobAccess
- Author
- Thorsten Suckow-Homberg
Constants
Properties
Methods

addLob(
array $data
)
:
stringSaves 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
| Name | Type | Description |
|---|---|---|
| $data | array |
| Type | Description |
|---|---|
| string | The path to the newly created lob, or null if not successfull |
| Exception | Description |
|---|---|
| \Conjoon_Data_Exception |

addLobFromStream(
array $data
)
:
mixedAdds the lob from a stream.
- path the target path
- resource the source resource
| Name | Type | Description |
|---|---|---|
| $data | array |
| Type | Description |
|---|---|
| mixed | a unique identifier for this lob, or null |
| Exception | Description |
|---|---|
| \Conjoon_Data_Exception |
- See
- \isStreamWritingSupported

copyLob(
array $data
)
:
mixedCopies 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
| Name | Type | Description |
|---|---|---|
| $data | array |
| Type | Description |
|---|---|
| mixed | the filename including the path of the copied file, otherwise null |
| Exception | Description |
|---|---|
| \Conjoon_Data_Exception |

deleteLob(
array $data
)
:
boolDeletes a lob.
The following properties have to be available in $data: - path The path to the LOB that should be removed
| Name | Type | Description |
|---|---|---|
| $data | array |
| Type | Description |
|---|---|
| bool | true on success, otherwise false |
| Exception | Description |
|---|---|
| \Conjoon_Data_Exception |

deleteLobForId(
string $path
)
:
boolDeletes a lob for an id.
The id would be the path of the file to delete.
| Name | Type | Description |
|---|---|---|
| $path | string |
| Type | Description |
|---|---|
| bool | true on success, otherwise false |
| Exception | Description |
|---|---|
| \Conjoon_Data_Exception |

getLobAsStream(
array $data
)
:
resource | nullReturns a stream resource for a lob.
The following properties must exist in $data: - path The complete path to the lob
| Name | Type | Description |
|---|---|---|
| $data | array |
| Type | Description |
|---|---|
| resource | null |
| Exception | Description |
|---|---|
| \Conjoon_Data_Exception |
- See
- \isStreamAccessSupported

getLobContent(
array $data
)
:
stringReturns the lob's content.
The following properties have to be available in $data: - path the full path to the lob
| Name | Type | Description |
|---|---|---|
| $data | array |
| Type | Description |
|---|---|
| string |
| Exception | Description |
|---|---|
| \Conjoon_Data_Exception |

getLobData(
array $data
)
:
arrayReturns 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
| Name | Type | Description |
|---|---|---|
| $data | array |
| 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 |
| Exception | Description |
|---|---|
| \Conjoon_Data_Exception |

isStreamAccessSupported(
)
:
boolReturns true if this class is capable of returning a lob as a stream, otherwise false
| Type | Description |
|---|---|
| bool |

isStreamWritingSupported(
)
:
boolReturns true if this class is capable of writing a lob as a stream, otherwise false
| Type | Description |
|---|---|
| bool |

moveLob(
array $data
)
:
mixedMoves 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
| Name | Type | Description |
|---|---|---|
| $data | array |
| Type | Description |
|---|---|
| mixed | a unique identifier for this moved lob, otherwise null |
| Exception | Description |
|---|---|
| \Conjoon_Data_Exception |

setLobName(
array $data
)
:
boolSets 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
| Name | Type | Description |
|---|---|---|
| $data | array |
| Type | Description |
|---|---|
| bool | true on success, otherwise false |
| Exception | Description |
|---|---|
| \Conjoon_Data_Exception |