PHP Class elFinder\elFinder

Afficher le fichier Open project: gotcms/gotcms

Méthodes publiques

Свойство Type Description
$mountErrors array Errors from not mounted volumes
$netDrivers
$volumesCnt integer Mounted volumes count Required to create unique volume id

Protected Properties

Свойство Type Description
$commands array Commands and required arguments list
$debug string Send debug to client?
$default elFinderStorageDriver Default root (storage)
$listeners array Commands listeners
$loaded boolean Is elFinder init correctly?
$time string script work time for debug
$uploadDebug string undocumented class variable
$version string API version number
$volumes array Storages (root dirs)

Méthodes publiques

Méthode Description
__construct ( $opts ) : void Constructor
bind ( $cmd, $handler ) : elFinder Add handler to elFinder command
commandArgsList ( $cmd ) : array Return command required arguments info
commandExists ( $cmd ) : boolean Return true if command exists
error ( ) : array Normalize error messages
exec ( string $cmd, array $args ) : array Exec command and return result
loaded ( ) : boolean Return true if fm init correctly
realpath ( string $hash ) : string Return file real path
unbind ( $cmd, $handler ) : elFinder Remove event (command exec) handler
version ( ) : string Return version (api) number

Méthodes protégées

Méthode Description
archive ( array $args ) : array Create archive
dim ( array $args ) : array Return image dimmensions
duplicate ( array $args ) : array Duplicate file - create copy with "copy %d" suffix
extract ( array $args ) : array Extract files from archive
file ( $args ) : array Required to output file in browser when volume URL is not set Return array contains opened file pointer, root itself and required headers
filter ( array $files ) : array Remove from files list hidden files and files with required mime types
get ( array $args ) : array Return file content
getNetVolumes ( ) : array Return network volumes config.
hashes ( array $files ) : array Return fils hashes list
info ( array $args ) : array Return file info (used by client "places" ui)
ls ( $args ) : array Return dir files names list
mkdir ( $args ) : array Create directory
mkfile ( $args ) : array Create empty file
netmount ( $args )
open ( $args ) : array "Open" directory Return array with following elements - cwd - opened dir info - files - opened dir content [and dirs tree if $args[tree]] - api - api version (if $args[init]) - uplMaxSize - if $args[init] - error - on failed
parents ( $args ) : array Return parents dir for required directory
paste ( $args ) : array Copy/move files into new destination
put ( $args ) : array Save content into text file
rename ( array $args ) : array Rename file
resize ( $args ) : array Resize image
rm ( $args ) : array Remove dirs/files
saveNetVolumes ( array $volumes ) : void Save network volumes config.
search ( array $args ) : array Search files
size ( $args ) : array Count total files size
tmb ( $args ) : array Return new created thumbnails list
toArray ( array $data ) : array Return files info array
tree ( $args ) : array Return subdirs for required directory
upload ( $args ) : array Save uploaded files
utime ( )
volume ( $hash ) : elFinderStorageDriver Return root - file's owner

Method Details

__construct() public méthode

Constructor
Author: Dmitry (dio) Levashov
public __construct ( $opts ) : void
Résultat void

archive() protected méthode

Create archive
Author: Dmitry (dio) Levashov,
Author: Alexey Sukhotin
protected archive ( array $args ) : array
$args array command arguments
Résultat array

bind() public méthode

Add handler to elFinder command
Author: Dmitry (dio) Levashov
public bind ( $cmd, $handler ) : elFinder
Résultat elFinder

commandArgsList() public méthode

Return command required arguments info
Author: Dmitry (dio) Levashov
public commandArgsList ( $cmd ) : array
Résultat array

commandExists() public méthode

Return true if command exists
Author: Dmitry (dio) Levashov
public commandExists ( $cmd ) : boolean
Résultat boolean

dim() protected méthode

Return image dimmensions
Author: Dmitry (dio) Levashov
protected dim ( array $args ) : array
$args array command arguments
Résultat array

duplicate() protected méthode

Duplicate file - create copy with "copy %d" suffix
Author: Dmitry (dio) Levashov
protected duplicate ( array $args ) : array
$args array command arguments
Résultat array

error() public méthode

Normalize error messages
Author: Dmitry (dio) Levashov
public error ( ) : array
Résultat array

exec() public méthode

Exec command and return result
Author: Dmitry (dio) Levashov
public exec ( string $cmd, array $args ) : array
$cmd string command name
$args array command arguments
Résultat array

extract() protected méthode

Extract files from archive
Author: Dmitry (dio) Levashov,
Author: Alexey Sukhotin
protected extract ( array $args ) : array
$args array command arguments
Résultat array

file() protected méthode

Required to output file in browser when volume URL is not set Return array contains opened file pointer, root itself and required headers
Author: Dmitry (dio) Levashov
protected file ( $args ) : array
Résultat array

filter() protected méthode

Remove from files list hidden files and files with required mime types
Author: Dmitry (dio) Levashov
protected filter ( array $files ) : array
$files array files info
Résultat array

get() protected méthode

Return file content
Author: Dmitry (dio) Levashov
protected get ( array $args ) : array
$args array command arguments
Résultat array

getNetVolumes() protected méthode

Return network volumes config.
Author: Dmitry (dio) Levashov
protected getNetVolumes ( ) : array
Résultat array

hashes() protected méthode

Return fils hashes list
Author: Dmitry (dio) Levashov
protected hashes ( array $files ) : array
$files array files info
Résultat array

info() protected méthode

Return file info (used by client "places" ui)
Author: Dmitry Levashov
protected info ( array $args ) : array
$args array command arguments
Résultat array

loaded() public méthode

Return true if fm init correctly
Author: Dmitry (dio) Levashov
public loaded ( ) : boolean
Résultat boolean

ls() protected méthode

Return dir files names list
Author: Dmitry (dio) Levashov
protected ls ( $args ) : array
Résultat array

mkdir() protected méthode

Create directory
Author: Dmitry (dio) Levashov
protected mkdir ( $args ) : array
Résultat array

mkfile() protected méthode

Create empty file
Author: Dmitry (dio) Levashov
protected mkfile ( $args ) : array
Résultat array

netmount() protected méthode

protected netmount ( $args )

open() protected méthode

"Open" directory Return array with following elements - cwd - opened dir info - files - opened dir content [and dirs tree if $args[tree]] - api - api version (if $args[init]) - uplMaxSize - if $args[init] - error - on failed
Author: Dmitry (dio) Levashov
protected open ( $args ) : array
Résultat array

parents() protected méthode

Return parents dir for required directory
Author: Dmitry (dio) Levashov
protected parents ( $args ) : array
Résultat array

paste() protected méthode

Copy/move files into new destination
Author: Dmitry (dio) Levashov
protected paste ( $args ) : array
Résultat array

put() protected méthode

Save content into text file
Author: Dmitry (dio) Levashov
protected put ( $args ) : array
Résultat array

realpath() public méthode

Return file real path
Author: Dmitry (dio) Levashov
public realpath ( string $hash ) : string
$hash string file hash
Résultat string

rename() protected méthode

Rename file
Author: Dmitry (dio) Levashov
protected rename ( array $args ) : array
$args array
Résultat array

resize() protected méthode

Resize image
Author: Dmitry (dio) Levashov
Author: Alexey Sukhotin
protected resize ( $args ) : array
Résultat array

rm() protected méthode

Remove dirs/files
Author: Dmitry (dio) Levashov
protected rm ( $args ) : array
Résultat array

saveNetVolumes() protected méthode

Save network volumes config.
Author: Dmitry (dio) Levashov
protected saveNetVolumes ( array $volumes ) : void
$volumes array volumes config
Résultat void

size() protected méthode

Count total files size
Author: Dmitry (dio) Levashov
protected size ( $args ) : array
Résultat array

tmb() protected méthode

Return new created thumbnails list
Author: Dmitry (dio) Levashov
protected tmb ( $args ) : array
Résultat array

toArray() protected méthode

Return files info array
Author: Dmitry (dio) Levashov
protected toArray ( array $data ) : array
$data array one file info or files info
Résultat array

tree() protected méthode

Return subdirs for required directory
Author: Dmitry (dio) Levashov
protected tree ( $args ) : array
Résultat array

unbind() public méthode

Remove event (command exec) handler
Author: Dmitry (dio) Levashov
public unbind ( $cmd, $handler ) : elFinder
Résultat elFinder

upload() protected méthode

Save uploaded files
Author: Dmitry (dio) Levashov
protected upload ( $args ) : array
Résultat array

utime() protected méthode

protected utime ( )

version() public méthode

Return version (api) number
Author: Dmitry (dio) Levashov
public version ( ) : string
Résultat string

volume() protected méthode

Return root - file's owner
Author: Dmitry (dio) Levashov
protected volume ( $hash ) : elFinderStorageDriver
Résultat elFinderStorageDriver

Property Details

$commands protected_oe property

Commands and required arguments list
protected array $commands
Résultat array

$debug protected_oe property

Send debug to client?
protected string $debug
Résultat string

$default protected_oe property

Default root (storage)
protected elFinderStorageDriver $default
Résultat elFinderStorageDriver

$listeners protected_oe property

Commands listeners
protected array $listeners
Résultat array

$loaded protected_oe property

Is elFinder init correctly?
protected bool $loaded
Résultat boolean

$mountErrors public_oe property

Errors from not mounted volumes
public array $mountErrors
Résultat array

$netDrivers public_oe static_oe property

public static $netDrivers

$time protected_oe property

script work time for debug
protected string $time
Résultat string

$uploadDebug protected_oe property

undocumented class variable
protected string $uploadDebug
Résultat string

$version protected_oe property

API version number
protected string $version
Résultat string

$volumes protected_oe property

Storages (root dirs)
protected array $volumes
Résultat array

$volumesCnt public_oe static_oe property

Mounted volumes count Required to create unique volume id
public static int $volumesCnt
Résultat integer