|
| __construct (array $backendConfig, CKFinder $app, FilesystemAdapter $adapter, array $filesystemConfig=[]) |
|
| getName () |
|
| getTrackedOperations () |
|
| buildPath (ResourceType $resourceType, string $path) |
|
| directories (ResourceType $resourceType, string $path='', bool $recursive=false) |
|
| files (ResourceType $resourceType, string $path='', bool $recursive=false) |
|
| containsDirectories (ResourceType $resourceType, string $path='') |
|
| isHiddenFile ($fileName) |
|
| isHiddenFolder ($folderName) |
|
| isHiddenPath ($path) |
|
| deleteDirectory (string $dirname) |
|
| deleteContents ($dirname) |
|
| hasDirectory (string $directoryPath) |
|
| getFileUrl (ResourceType $resourceType, string $folderPath, string $fileName, string $thumbnailFileName=null) |
|
| getBaseUrl () |
|
| getRootDirectory () |
|
| usesProxyCommand () |
|
| createWriteStream (string $path) |
|
| rename ($path, $newPath) |
|
| getBaseAdapter () |
|
The Backend file system class.
A wrapper class for League\Flysystem\Filesystem with CKFinder customizations.
◆ __construct()
__construct |
( |
array |
$backendConfig, |
|
|
CKFinder |
$app, |
|
|
FilesystemAdapter |
$adapter, |
|
|
array |
$filesystemConfig = [] |
|
) |
| |
Constructor.
- Parameters
-
array | $backendConfig | the backend configuration node |
CKFinder | $app | the CKFinder app container |
FilesystemAdapter | $adapter | the adapter |
array | $filesystemConfig | the configuration |
◆ buildPath()
Returns a path based on the resource type and the resource type relative path.
- Parameters
-
ResourceType | $resourceType | the resource type |
string | $path | the resource type relative path |
- Returns
- string path to be used with the backend adapter
◆ containsDirectories()
containsDirectories |
( |
ResourceType |
$resourceType, |
|
|
string |
$path = '' |
|
) |
| |
Check if the directory for a given path contains subdirectories.
- Returns
- bool
true
if the directory contains subdirectories
- Exceptions
-
◆ createWriteStream()
createWriteStream |
( |
string |
$path | ) |
|
Creates a stream for writing.
- Parameters
-
- Returns
- null|resource a stream to a file or
null
if the backend does not support writing streams
◆ deleteContents()
deleteContents |
( |
|
$dirname | ) |
|
Delete all contents of the given directory.
- Parameters
-
- Exceptions
-
◆ deleteDirectory()
deleteDirectory |
( |
string |
$dirname | ) |
|
Deletes a directory.
- Exceptions
-
◆ directories()
directories |
( |
ResourceType |
$resourceType, |
|
|
string |
$path = '' , |
|
|
bool |
$recursive = false |
|
) |
| |
Returns a filtered list of directories for a given resource type and path.
- Exceptions
-
◆ files()
files |
( |
ResourceType |
$resourceType, |
|
|
string |
$path = '' , |
|
|
bool |
$recursive = false |
|
) |
| |
Returns a filtered list of files for a given resource type and path.
- Exceptions
-
◆ getBaseAdapter()
Returns a base adapter used by this backend.
◆ getBaseUrl()
Returns the base URL used to build the direct URL to files stored in this backend.
- Returns
- null|string base URL or
null
if the base URL for a backend was not defined
◆ getFileUrl()
getFileUrl |
( |
ResourceType |
$resourceType, |
|
|
string |
$folderPath, |
|
|
string |
$fileName, |
|
|
string |
$thumbnailFileName = null |
|
) |
| |
Returns a URL to a file.
If the useProxyCommand option is set for a backend, the returned URL will point to the CKFinder connector Proxy command.
- Parameters
-
ResourceType | $resourceType | the file resource type |
string | $folderPath | the resource-type relative folder path |
string | $fileName | the file name |
null | string | $thumbnailFileName | the thumbnail file name - if the file is a thumbnail |
- Returns
- null|string URL to a file or
null
if the backend does not support it
◆ getName()
Returns the name of the backend.
- Returns
- string name of the backend
◆ getRootDirectory()
Returns the root directory defined for the backend.
- Returns
- null|string root directory or
null
if the root directory was not defined
◆ getTrackedOperations()
Returns an array of commands that should use operation tracking.
◆ hasDirectory()
hasDirectory |
( |
string |
$directoryPath | ) |
|
Checks if a backend contains a directory.
The Backend::has() method is not always reliable and may work differently for various adapters. Checking for directory should be done with this method.
◆ isHiddenFile()
isHiddenFile |
( |
|
$fileName | ) |
|
Checks if the file with a given name is hidden.
- Parameters
-
- Returns
- bool
true
if the file is hidden
◆ isHiddenFolder()
isHiddenFolder |
( |
|
$folderName | ) |
|
Checks if the directory with a given name is hidden.
- Parameters
-
- Returns
- bool
true
if the directory is hidden
◆ isHiddenPath()
Checks if the path is hidden.
- Parameters
-
- Returns
- bool
true
if the path is hidden
◆ rename()
rename |
( |
|
$path, |
|
|
|
$newPath |
|
) |
| |
Renames the object for a given path.
- Parameters
-
- Returns
- null|bool
true
on success, false
on failure
- Exceptions
-
◆ usesProxyCommand()
Returns a Boolean value telling if the backend uses the Proxy command.
◆ $adapter
◆ $backendConfig
The documentation for this class was generated from the following file: