Modules/Groupware/Files/Facade.php
\Conjoon_Modules_Groupware_Files_Facade
Package: Default
Returns
Parameters
Returns
Throws
- Author
- Thorsten Suckow-Homberg
Properties
Methods

_getFileFacade(
)
:
\Conjoon_Modules_Groupware_Files_File_Facade
Returns
| Type | Description |
|---|---|
| \Conjoon_Modules_Groupware_Files_File_Facade |

_getFolderFacade(
)
:
\Conjoon_Modules_Groupware_Files_Folder_Facade
Returns
| Type | Description |
|---|---|
| \Conjoon_Modules_Groupware_Files_Folder_Facade |

_getUploadMaxFileSize(
)
:
floatReturns the number of bytes denoting the maximum file size for uploads.
Returns
| Type | Description |
|---|---|
| float |

addFileDataToTempFolderForUser(
string $name, resource | string $content, string $type, $userId
)
:
mixedSaves the file into the temp folder for the specified user and returns a Dto with further information about the file.
Parameters
Returns
Throws
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $content | resource | string | |
| $type | string | |
| $userId |
| Type | Description |
|---|---|
| mixed | null if an error occured, otherwise an instance of Conjoon_Groupware_Files_File_Dto |
| Exception | Description |
|---|---|
| \InvalidArgumentException |

generateUploadObject(
)
:
\Zend_File_Transfer_Adapter_HttpReturns an upload object based on the global accessible $_FILES variable.
The returned upload will be pre-configured with a validator for the system's max upload size and the count of allowed simultaneusly uploads set to 1.
| Type | Description |
|---|---|
| \Zend_File_Transfer_Adapter_Http |

uploadFileToTempFolderForUser(
\Zend_File_Transfer_Adapter_Http $upload, int $userId
)
:
nullUploads the specified file found in $upload for the specified user to the temp folder.
As of know, only one file per upload is permitted. make sure the upload has been filtered and validated before passing it to this method
| Name | Type | Description |
|---|---|---|
| $upload | \Zend_File_Transfer_Adapter_Http | |
| $userId | int |
| Type | Description |
|---|---|
| null | if an error occured or Conjoon_Groupware_Files_File_Dto |
| Exception | Description |
|---|---|
| \InvalidArgumentException | |
| \Conjoon_Modules_Groupware_Files_Exception |