package
|
OCA\Gallery\Service
|
Methods
Constructor
__construct(string $appName, \OCA\Gallery\Environment\Environment $environment, \OCP\ILogger $logger)
inherited
Downloads the requested file
downloadFile(\OCP\Files\File $file, boolean $base64Encode = false) : array|false
Throws |
- \OCA\Gallery\Service\NotFoundServiceException
|
Arguments
Response
array|false
Returns base64 encoded data of a preview
encode(\OC_Image|string $previewData) : string
inherited
Using base64_encode for files which are downloaded
(cached Thumbnails, SVG, GIFs) and using __toStrings
for the previews which are instances of \OC_Image
Arguments
$previewData
\OC_Image|string
Response
string
Returns the file matching the given ID
getFile(integer $nodeId) : \OCP\Files\Node
inherited
Throws |
- \OCA\Gallery\Service\NotFoundServiceException
|
Arguments
$nodeId
integer
ID of the resource to locate
Response
\OCP\Files\Node
Returns the node matching the given ID
getNode(integer $nodeId) : \OCP\Files\Node
inherited
Throws |
- \OCA\Gallery\Service\NotFoundServiceException
|
Arguments
$nodeId
integer
ID of the resource to locate
Response
\OCP\Files\Node
Makes extra sure that we can actually do something with the file
validateNode(\OCP\Files\Node $node)
inherited
|
|
Throws |
- \OCA\Gallery\Service\NotFoundServiceException
|
Arguments
Properties
appName
appName : string
inherited
environment
environment : \OCA\Gallery\Environment\Environment
inherited
logger
logger : \OCP\ILogger
inherited