ZenphotoCMS 1.6.6

elFinder
in package

elFinder - file manager for web.

Core class.

Tags
author

Dmitry (dio) Levashov

author

Troex Nevelin

author

Alexey Sukhotin

Table of Contents

Constants

ERROR_ACCESS_DENIED  = 'errAccess'
ERROR_ARC_MAXSIZE  = 'errArcMaxSize'
ERROR_ARC_SYMLINKS  = 'errArcSymlinks'
ERROR_ARCHIVE  = 'errArchive'
ERROR_ARCHIVE_EXEC  = 'errArchiveExec'
ERROR_ARCHIVE_TYPE  = 'errArcType'
ERROR_CONF  = 'errConf'
ERROR_CONF_NO_JSON  = 'errJSON'
ERROR_CONF_NO_VOL  = 'errNoVolumes'
ERROR_CONV_UTF8  = 'errConvUTF8'
ERROR_COPY  = 'errCopy'
ERROR_COPY_FROM  = 'errCopyFrom'
ERROR_COPY_ITSELF  = 'errCopyInItself'
ERROR_COPY_TO  = 'errCopyTo'
ERROR_CREATING_TEMP_DIR  = 'errCreatingTempDir'
ERROR_DIR_NOT_FOUND  = 'errFolderNotFound'
ERROR_EXISTS  = 'errExists'
ERROR_EXTRACT  = 'errExtract'
ERROR_EXTRACT_EXEC  = 'errExtractExec'
ERROR_FILE_NOT_FOUND  = 'errFileNotFound'
ERROR_FTP_DOWNLOAD_FILE  = 'errFtpDownloadFile'
ERROR_FTP_MKDIR  = 'errFtpMkdir'
ERROR_FTP_UPLOAD_FILE  = 'errFtpUploadFile'
ERROR_INV_PARAMS  = 'errCmdParams'
ERROR_INVALID_DIRNAME  = 'errInvDirname'
ERROR_INVALID_NAME  = 'errInvName'
ERROR_LOCKED  = 'errLocked'
ERROR_MAX_MKDIRS  = 'errMaxMkdirs'
ERROR_MAX_TARGTES  = 'errMaxTargets'
ERROR_MKDIR  = 'errMkdir'
ERROR_MKFILE  = 'errMkfile'
ERROR_MKOUTLINK  = 'errMkOutLink'
ERROR_MOVE  = 'errMove'
ERROR_NETMOUNT  = 'errNetMount'
ERROR_NETMOUNT_FAILED  = 'errNetMountFailed'
ERROR_NETMOUNT_NO_DRIVER  = 'errNetMountNoDriver'
ERROR_NETUNMOUNT  = 'errNetUnMount'
ERROR_NOT_ARCHIVE  = 'errNoArchive'
ERROR_NOT_DIR  = 'errNotFolder'
ERROR_NOT_FILE  = 'errNotFile'
ERROR_NOT_REPLACE  = 'errNotReplace'
ERROR_NOT_UTF8_CONTENT  = 'errNotUTF8Content'
ERROR_OPEN  = 'errOpen'
ERROR_PERM_DENIED  = 'errPerm'
ERROR_REAUTH_REQUIRE  = 'errReauthRequire'
ERROR_RENAME  = 'errRename'
ERROR_REPLACE  = 'errReplace'
ERROR_RESIZE  = 'errResize'
ERROR_RESIZESIZE  = 'errResizeSize'
ERROR_RM  = 'errRm'
ERROR_RM_SRC  = 'errRmSrc'
ERROR_SAVE  = 'errSave'
ERROR_SEARCH_TIMEOUT  = 'errSearchTimeout'
ERROR_SESSION_EXPIRES  = 'errSessionExpires'
ERROR_TRGDIR_NOT_FOUND  = 'errTrgFolderNotFound'
ERROR_UNKNOWN  = 'errUnknown'
ERROR_UNKNOWN_CMD  = 'errUnknownCmd'
ERROR_UNSUPPORT_TYPE  = 'errUsupportType'
ERROR_UPLOAD  = 'errUpload'
ERROR_UPLOAD_FILE  = 'errUploadFile'
ERROR_UPLOAD_FILE_MIME  = 'errUploadMime'
ERROR_UPLOAD_FILE_SIZE  = 'errUploadFileSize'
ERROR_UPLOAD_NO_FILES  = 'errUploadNoFiles'
ERROR_UPLOAD_TEMP  = 'errUploadTemp'
ERROR_UPLOAD_TOTAL_SIZE  = 'errUploadTotalSize'
ERROR_UPLOAD_TRANSFER  = 'errUploadTransfer'

Properties

$archivers  : array<string|int, mixed>
Archivers cache
$currentArgs  : array<string|int, mixed>
Current request args
$defaultMimefile  : string
elFinderVolumeDriver default mime.type file path
$instance  : object
elFinder instance
$locale  : string
elFinder global locale
$maxTargets  : int
Max allowed numbar of targets (0 - no limit)
$memoryLimitGD  : int|string
Maximum memory size to be extended during GD processing (0: not expanded, -1: unlimited or memory size notation)
$mountErrors  : array<string|int, mixed>
Errors from not mounted volumes
$netDrivers  : array<string|int, mixed>
Network mount drivers
$phpErrors  : array<string|int, mixed>
Errors from PHP
$sessionCacheKey  : string
elFinder global sessionCacheKey
$textMimes  : array<string|int, mixed>
MIME type list handled as a text file
$tmpLinkLifeTime  : int
Temporary content URL lifetime (seconds)
$tmpLinkPath  : string
A file save destination path when a temporary content URL is required on a network volume or the like It can be overwritten by volume route setting
$tmpLinkUrl  : string
A file save destination URL when a temporary content URL is required on a network volume or the like It can be overwritten by volume route setting
$volumesCnt  : int
Mounted volumes count Required to create unique volume id
$abortCheckFile  : string
Path of current request flag file for abort check
$ApiRevision  : int
API revision that this connector supports all functions
$ApiVersion  : float
API version number
$autoUnlocks  : array<string|int, mixed>
hash of items to unlock on command completion
$base64encodeSessionData  : bool
elFinder base64encodeSessionData elFinder save session data as `UTF-8` If the session storage mechanism of the system does not allow `UTF-8` And it must be `true` option 'base64encodeSessionData' of elFinder WARNING: When enabling this option, if saving the data passed from the user directly to the session variable, it make vulnerable to the object injection attack, so use it carefully.
$callbackWindowURL  : string
URL for callback output window for CORS redirect to this URL when callback output
$commands  : array<string|int, mixed>
Commands and required arguments list
$commonTempPath  : string
elFinder common tempraly path
$connectionFlagsPath  : string
Connection flag files path that connection check of current request
$customData  : array<string|int, mixed>|null
Additional request querys
$debug  : string
Send debug to client?
$default  : elFinderVolumeDriver
Default root (storage)
$itemLockExpire  : int
Item locking expiration (seconds) Default: 3600 secs
$listeners  : array<string|int, mixed>
Commands listeners
$loaded  : bool
Is elFinder init correctly?
$maxArcFilesSize  : int
Max allowed archive files size (0 - no limit)
$netVolumesSessionKey  : string
Session key of net mount volumes
$optionsNetVolumes  : array<string|int, mixed>
Additional volume root options for network mounting volume
$plugins  : array<string|int, mixed>
Plugins instance
$removeContentSaveIds  : array<string|int, mixed>
Ids to remove of session var "urlContentSaveIds" for contents uploading by URL
$session  : elFinderSessionInterface
elFinder session wrapper object
$sessionCloseEarlier  : bool
Call `session_write_close()` before exec command?
$sessionUseCmds  : array<string|int, mixed>
SESSION use commands @see __construct()
$throwErrorOnExec  : bool
Flag of throw Error on exec()
$time  : string
script work time for debug
$timeout  : int
session expires timeout
$toastParamsDefault  : array<string|int, mixed>
Default params of toastParams
$uploadAllowedLanIpClasses  : array<string|int, mixed>
LAN class allowed when uploading via URL
$uploadDebug  : string
undocumented class variable
$uploadTempPath  : string
Temp dir path for Upload
$urlUploadFilter  : callable
Callable function for URL upload filter The first argument is a URL and the second argument is an instance of the elFinder class A filter should be return true (to allow) / false (to disallow)
$version  : string
API version number
$volumes  : array<string|int, mixed>
Storages (root dirs)
$seekableUrlFps  : array<string|int, mixed>
Seekable URL file pointer ids - for getStreamByUrl()
$sessionClosed  : bool
Is session closed
$toastMessages  : array<string|int, mixed>
Toast messages of runtime notification
$toastParams  : array<string|int, mixed>
Toast params of runtime notification
$utf8Encoder  : mixed
Optional UTF-8 encoder

Methods

__construct()  : mixed
Constructor
aborted()  : bool
Return bool that current request was aborted by client side
bind()  : elFinder
Add handler to elFinder command
checkAborted()  : void
Check connection is aborted Script stop immediately if connection aborted
commandArgsList()  : array<string|int, mixed>
Return command required arguments info
commandExists()  : bool
Return true if command exists
curlExec()  : mixed
Call curl_exec() with supported redirect on `safe_mode` or `open_basedir`
error()  : array<string|int, mixed>
Normalize error messages
exec()  : array<string|int, mixed>
Exec command and return result
expandMemoryForGD()  : mixed
Auto expand memory for GD processing
extendTimeLimit()  : void
Extend PHP execution time limit and also check connection is aborted
filenameDecontaminate()  : string
Decontaminate of filename
getApiFullVersion()  : string
Return full version of API that this connector supports all functions
getCommonTempPath()  : string
Return self::$commonTempPath
getConnectorUrl()  : string
Get script url.
getFetchCookieFile()  : string
Gets the fetch cookie file for curl.
getIniBytes()  : number
Return bytes from php.ini value
getMemorySizeByImageInfo()  : int
Gets the memory size by imageinfo.
getSession()  : elFinderSessionInterface
Return elFinder session wrapper instance
getStaticVar()  : mixed|null
Return elFinder static variable
getStreamByUrl()  : resource|bool
Get stream resource pointer by URL
getVolume()  : elFinderVolumeDriver
Return root - file's owner (public func of volume())
GlobGC()  : mixed
Garbage collection with glob
isAnimationGif()  : bool
Return Is Animation Gif
isAnimationPng()  : bool
Return Is Animation Png
isSeekableStream()  : bool
Return Is seekable stream resource
isSeekableUrl()  : bool
Determines whether the specified resource is seekable url.
itemAutoUnlock()  : void
unlock locked items on command completion
loaded()  : bool
Return true if fm init correctly
onShutdown()  : mixed
Call back function on shutdown - delete files in $GLOBALS['elFinderTempFiles']
phpErrorHandler()  : bool
PHP error handler, catch error types only E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE
procExec()  : int
Execute shell command
realpath()  : string
Return file real path
removeCustomData()  : self
Removes a custom data.
removeUrlContentSaveId()  : mixed
remove of session var "urlContentSaveIds"
revision()  : string
Return revision (api) number
rewind()  : void
Rewind stream resource
rmFileInDisconnected()  : mixed
Remove a file if connection is disconnected
sessionDataDecode()  : bool|mixed
base64_decode and unserialize of session data (If needed)
sessionDataEncode()  : mixed|string
serialize and base64_encode of session data (If needed)
sessionWrite()  : void
Call session_write_close() if session is restarted
setCustomData()  : self
Sets custom data(s).
setToastErrorHandler()  : mixed
Sets the toast error handler.
splitFileExtention()  : array<string|int, mixed>
Return array ["name without extention", "extention"] by filename
trigger()  : mixed
Trigger binded functions
unbind()  : elFinder
Remove event (command exec) handler
updateNetVolumeOption()  : bool
Update sesstion value of a NetVolume option
utf8Encode()  : string
String encode convert to UTF-8
version()  : string
Return version (api) number
xKilobyte()  : number
Return X 1KByte
abort()  : void
Abort current request and make flag file to running check
addSubToBindName()  : string
Add subName to commandName
archive()  : array<string|int, mixed>
Create archive
callback()  : mixed
Output callback result with JavaScript that control elFinder or HTTP redirect to callbackWindowURL
chmod()  : array<string|int, mixed>
chmod
curl_get_contents()  : mixed
Get remote contents with cURL
detectFileExtension()  : string
Detect file type extension by local path
detectMimeType()  : string
Detect file MIME Type by local path
dim()  : array<string|int, mixed>
Return image dimensions
duplicate()  : array<string|int, mixed>
Duplicate file - create copy with "copy %d" suffix
editor()  : array<string|int, mixed>
Gateway for custom contents editor
ensureDirsRecursively()  : array<string|int, mixed>|false
Ensure directories recursively
extract()  : array<string|int, mixed>
Extract files from archive
file()  : array<string|int, mixed>
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<string|int, mixed>
Remove from files list hidden files and files with required mime types
fsock_get_contents()  : mixed
Get remote contents with fsockopen()
get()  : array<string|int, mixed>
Return file content
get_remote_contents()  : mixed
Get remote contents
getCmdOfBind()  : string
Get command name of binded "commandName.subName"
getNetVolumes()  : array<string|int, mixed>
Return network volumes config.
getNetVolumeUniqueId()  : string|false
Return Network mount volume unique ID
getPluginInstance()  : object|bool
Get plugin instance & set to $this->plugins
hashes()  : array<string|int, mixed>
Return fils hashes list
info()  : array<string|int, mixed>
Return file info (used by client "places" ui)
itemLock()  : void
Do lock target item
itemLocked()  : bool
Is item locked?
itemUnlock()  : bool
Do unlock target item
ls()  : array<string|int, mixed>
Return dir files names list
mkdir()  : array<string|int, mixed>
Create directory
mkfile()  : array<string|int, mixed>
Create empty file
netmount()  : array<string|int, mixed>
open()  : array<string|int, mixed>
"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()  : array<string|int, mixed>
Return parents dir for required directory
parse_data_scheme()  : array<string|int, mixed>
Parse Data URI scheme
paste()  : array<string|int, mixed>
Copy/move files into new destination
put()  : array<string|int, mixed>
Save content into text file
removeNetVolume()  : bool
Remove netmount volume
rename()  : array<string|int, mixed>
Rename file, Accept multiple items >= API 2.1031
resize()  : array<string|int, mixed>
Resize image
rm()  : array<string|int, mixed>
Remove dirs/files
saveNetVolumes()  : void
Save network volumes config.
search()  : array<string|int, mixed>
Search files
size()  : array<string|int, mixed>
Count total files size
subdirs()  : array<string|int, mixed>
Return has subdirs
tmb()  : array<string|int, mixed>
Return new created thumbnails list
toArray()  : array<string|int, mixed>
Return files info array
toastErrorHandler()  : bool
Error handler for send toast message to client side
tree()  : array<string|int, mixed>
Return subdirs for required directory
upload()  : array<string|int, mixed>
Save uploaded files
url()  : array<string|int, mixed>
Return content URL
utime()  : mixed
validate_address()  : false|array<string|int, mixed>
Validate an URL to prevent SSRF attacks.
volume()  : elFinderVolumeDriver|bool
Return root - file's owner
zipdl()  : array<string|int, mixed>
Download files/folders as an archive file 1st: Return srrsy contains download archive file info 2nd: Return array contains opened file pointer, root itself and required headers
checkChunkedFile()  : array<string|int, mixed>|null
Check chunked upload files
getTempDir()  : string
Get temporary directory path
session_expires()  : mixed

Constants

ERROR_ACCESS_DENIED

public mixed ERROR_ACCESS_DENIED = 'errAccess'

ERROR_ARC_MAXSIZE

public mixed ERROR_ARC_MAXSIZE = 'errArcMaxSize'
public mixed ERROR_ARC_SYMLINKS = 'errArcSymlinks'

ERROR_ARCHIVE_EXEC

public mixed ERROR_ARCHIVE_EXEC = 'errArchiveExec'

ERROR_ARCHIVE_TYPE

public mixed ERROR_ARCHIVE_TYPE = 'errArcType'

ERROR_CONF_NO_VOL

public mixed ERROR_CONF_NO_VOL = 'errNoVolumes'

ERROR_COPY_ITSELF

public mixed ERROR_COPY_ITSELF = 'errCopyInItself'

ERROR_CREATING_TEMP_DIR

public mixed ERROR_CREATING_TEMP_DIR = 'errCreatingTempDir'

ERROR_DIR_NOT_FOUND

public mixed ERROR_DIR_NOT_FOUND = 'errFolderNotFound'

ERROR_EXTRACT_EXEC

public mixed ERROR_EXTRACT_EXEC = 'errExtractExec'

ERROR_FILE_NOT_FOUND

public mixed ERROR_FILE_NOT_FOUND = 'errFileNotFound'

ERROR_FTP_DOWNLOAD_FILE

public mixed ERROR_FTP_DOWNLOAD_FILE = 'errFtpDownloadFile'

ERROR_FTP_UPLOAD_FILE

public mixed ERROR_FTP_UPLOAD_FILE = 'errFtpUploadFile'

ERROR_INV_PARAMS

public mixed ERROR_INV_PARAMS = 'errCmdParams'

ERROR_INVALID_DIRNAME

public mixed ERROR_INVALID_DIRNAME = 'errInvDirname'

ERROR_INVALID_NAME

public mixed ERROR_INVALID_NAME = 'errInvName'

ERROR_MAX_MKDIRS

public mixed ERROR_MAX_MKDIRS = 'errMaxMkdirs'

ERROR_MAX_TARGTES

public mixed ERROR_MAX_TARGTES = 'errMaxTargets'

ERROR_NETMOUNT_FAILED

public mixed ERROR_NETMOUNT_FAILED = 'errNetMountFailed'

ERROR_NETMOUNT_NO_DRIVER

public mixed ERROR_NETMOUNT_NO_DRIVER = 'errNetMountNoDriver'

ERROR_NETUNMOUNT

public mixed ERROR_NETUNMOUNT = 'errNetUnMount'

ERROR_NOT_ARCHIVE

public mixed ERROR_NOT_ARCHIVE = 'errNoArchive'

ERROR_NOT_REPLACE

public mixed ERROR_NOT_REPLACE = 'errNotReplace'

ERROR_NOT_UTF8_CONTENT

public mixed ERROR_NOT_UTF8_CONTENT = 'errNotUTF8Content'

ERROR_REAUTH_REQUIRE

public mixed ERROR_REAUTH_REQUIRE = 'errReauthRequire'

ERROR_RESIZESIZE

public mixed ERROR_RESIZESIZE = 'errResizeSize'

ERROR_SEARCH_TIMEOUT

public mixed ERROR_SEARCH_TIMEOUT = 'errSearchTimeout'

ERROR_SESSION_EXPIRES

public mixed ERROR_SESSION_EXPIRES = 'errSessionExpires'

ERROR_TRGDIR_NOT_FOUND

public mixed ERROR_TRGDIR_NOT_FOUND = 'errTrgFolderNotFound'

ERROR_UNKNOWN_CMD

public mixed ERROR_UNKNOWN_CMD = 'errUnknownCmd'

ERROR_UNSUPPORT_TYPE

public mixed ERROR_UNSUPPORT_TYPE = 'errUsupportType'

ERROR_UPLOAD_FILE

public mixed ERROR_UPLOAD_FILE = 'errUploadFile'

ERROR_UPLOAD_FILE_MIME

public mixed ERROR_UPLOAD_FILE_MIME = 'errUploadMime'

ERROR_UPLOAD_FILE_SIZE

public mixed ERROR_UPLOAD_FILE_SIZE = 'errUploadFileSize'

ERROR_UPLOAD_NO_FILES

public mixed ERROR_UPLOAD_NO_FILES = 'errUploadNoFiles'

ERROR_UPLOAD_TEMP

public mixed ERROR_UPLOAD_TEMP = 'errUploadTemp'

ERROR_UPLOAD_TOTAL_SIZE

public mixed ERROR_UPLOAD_TOTAL_SIZE = 'errUploadTotalSize'

ERROR_UPLOAD_TRANSFER

public mixed ERROR_UPLOAD_TRANSFER = 'errUploadTransfer'

Properties

$archivers

Archivers cache

public static array<string|int, mixed> $archivers = array()

$currentArgs

Current request args

public static array<string|int, mixed> $currentArgs = array()

$defaultMimefile

elFinderVolumeDriver default mime.type file path

public static string $defaultMimefile = ''

$instance

elFinder instance

public static object $instance = \null

$locale

elFinder global locale

public static string $locale = ''

$maxTargets

Max allowed numbar of targets (0 - no limit)

public int $maxTargets = 1000

$memoryLimitGD

Maximum memory size to be extended during GD processing (0: not expanded, -1: unlimited or memory size notation)

public static int|string $memoryLimitGD = 0

$mountErrors

Errors from not mounted volumes

public array<string|int, mixed> $mountErrors = array()

$netDrivers

Network mount drivers

public static array<string|int, mixed> $netDrivers = array()

$phpErrors

Errors from PHP

public static array<string|int, mixed> $phpErrors = array()

$sessionCacheKey

elFinder global sessionCacheKey

public static string $sessionCacheKey = ''

$textMimes

MIME type list handled as a text file

public static array<string|int, mixed> $textMimes = array('application/dash+xml', 'application/docbook+xml', 'application/javascript', 'application/json', 'application/plt', 'application/sat', 'application/sql', 'application/step', 'application/vnd.hp-hpgl', 'application/x-awk', 'application/x-config', 'application/x-csh', 'application/x-empty', 'application/x-mpegurl', 'application/x-perl', 'application/x-php', 'application/x-web-config', 'application/xhtml+xml', 'application/xml', 'audio/x-mp3-playlist', 'image/cgm', 'image/svg+xml', 'image/vnd.dxf', 'model/iges')

$tmpLinkLifeTime

Temporary content URL lifetime (seconds)

public static int $tmpLinkLifeTime = 3600

$tmpLinkPath

A file save destination path when a temporary content URL is required on a network volume or the like It can be overwritten by volume route setting

public static string $tmpLinkPath = ''

$tmpLinkUrl

A file save destination URL when a temporary content URL is required on a network volume or the like It can be overwritten by volume route setting

public static string $tmpLinkUrl = ''

$volumesCnt

Mounted volumes count Required to create unique volume id

public static int $volumesCnt = 1

$abortCheckFile

Path of current request flag file for abort check

protected static string $abortCheckFile = \null

$ApiRevision

API revision that this connector supports all functions

protected static int $ApiRevision = 64

$ApiVersion

API version number

protected static float $ApiVersion = 2.1

$autoUnlocks

hash of items to unlock on command completion

protected array<string|int, mixed> $autoUnlocks = array()

hashes

$base64encodeSessionData

elFinder base64encodeSessionData elFinder save session data as `UTF-8` If the session storage mechanism of the system does not allow `UTF-8` And it must be `true` option 'base64encodeSessionData' of elFinder WARNING: When enabling this option, if saving the data passed from the user directly to the session variable, it make vulnerable to the object injection attack, so use it carefully.

protected static bool $base64encodeSessionData = \false

see https://github.com/Studio-42/elFinder/issues/2345

$callbackWindowURL

URL for callback output window for CORS redirect to this URL when callback output

protected string $callbackWindowURL = ''

URL

$commands

Commands and required arguments list

protected array<string|int, mixed> $commands = array('abort' => array('id' => \true), 'archive' => array('targets' => \true, 'type' => \true, 'mimes' => \false, 'name' => \false), 'callback' => array('node' => \true, 'json' => \false, 'bind' => \false, 'done' => \false), 'chmod' => array('targets' => \true, 'mode' => \true), 'dim' => array('target' => \true, 'substitute' => \false), 'duplicate' => array('targets' => \true, 'suffix' => \false), 'editor' => array('name' => \true, 'method' => \true, 'args' => \false), 'extract' => array('target' => \true, 'mimes' => \false, 'makedir' => \false), 'file' => array('target' => \true, 'download' => \false, 'cpath' => \false, 'onetime' => \false), 'get' => array('target' => \true, 'conv' => \false), 'info' => array('targets' => \true, 'compare' => \false), 'ls' => array('target' => \true, 'mimes' => \false, 'intersect' => \false), 'mkdir' => array('target' => \true, 'name' => \false, 'dirs' => \false), 'mkfile' => array('target' => \true, 'name' => \true, 'mimes' => \false), 'netmount' => array('protocol' => \true, 'host' => \true, 'path' => \false, 'port' => \false, 'user' => \false, 'pass' => \false, 'alias' => \false, 'options' => \false), 'open' => array('target' => \false, 'tree' => \false, 'init' => \false, 'mimes' => \false, 'compare' => \false), 'parents' => array('target' => \true, 'until' => \false), 'paste' => array('dst' => \true, 'targets' => \true, 'cut' => \false, 'mimes' => \false, 'renames' => \false, 'hashes' => \false, 'suffix' => \false), 'put' => array('target' => \true, 'content' => '', 'mimes' => \false, 'encoding' => \false), 'rename' => array('target' => \true, 'name' => \true, 'mimes' => \false, 'targets' => \false, 'q' => \false), 'resize' => array('target' => \true, 'width' => \false, 'height' => \false, 'mode' => \false, 'x' => \false, 'y' => \false, 'degree' => \false, 'quality' => \false, 'bg' => \false), 'rm' => array('targets' => \true), 'search' => array('q' => \true, 'mimes' => \false, 'target' => \false, 'type' => \false), 'size' => array('targets' => \true), 'subdirs' => array('targets' => \true), 'tmb' => array('targets' => \true), 'tree' => array('target' => \true), 'upload' => array('target' => \true, 'FILES' => \true, 'mimes' => \false, 'html' => \false, 'upload' => \false, 'name' => \false, 'upload_path' => \false, 'chunk' => \false, 'cid' => \false, 'node' => \false, 'renames' => \false, 'hashes' => \false, 'suffix' => \false, 'mtime' => \false, 'overwrite' => \false, 'contentSaveId' => \false), 'url' => array('target' => \true, 'options' => \false), 'zipdl' => array('targets' => \true, 'download' => \false))

$commonTempPath

elFinder common tempraly path

protected static string $commonTempPath = ''
Tags
default

"./.tmp" or sys_get_temp_dir()

$connectionFlagsPath

Connection flag files path that connection check of current request

protected static string $connectionFlagsPath = ''
Tags
default

value of $commonTempPath

$customData

Additional request querys

protected array<string|int, mixed>|null $customData = \null

$itemLockExpire

Item locking expiration (seconds) Default: 3600 secs

protected int $itemLockExpire = 3600

$listeners

Commands listeners

protected array<string|int, mixed> $listeners = array()

$loaded

Is elFinder init correctly?

protected bool $loaded = \false

$maxArcFilesSize

Max allowed archive files size (0 - no limit)

protected int $maxArcFilesSize = 0

$netVolumesSessionKey

Session key of net mount volumes

protected string $netVolumesSessionKey = ''

$optionsNetVolumes

Additional volume root options for network mounting volume

protected array<string|int, mixed> $optionsNetVolumes = array()

$plugins

Plugins instance

protected array<string|int, mixed> $plugins = array()

$removeContentSaveIds

Ids to remove of session var "urlContentSaveIds" for contents uploading by URL

protected array<string|int, mixed> $removeContentSaveIds = array()

$sessionCloseEarlier

Call `session_write_close()` before exec command?

protected bool $sessionCloseEarlier = \true

$sessionUseCmds

SESSION use commands @see __construct()

protected array<string|int, mixed> $sessionUseCmds = array()

$throwErrorOnExec

Flag of throw Error on exec()

protected bool $throwErrorOnExec = \false

$toastParamsDefault

Default params of toastParams

protected array<string|int, mixed> $toastParamsDefault = array('mode' => 'warning', 'prefix' => '')

$uploadAllowedLanIpClasses

LAN class allowed when uploading via URL

protected array<string|int, mixed> $uploadAllowedLanIpClasses = array()

Array keys are 'local', 'private_a', 'private_b', 'private_c' and 'link'

local: 127.0.0.0/8 private_a: 10.0.0.0/8 private_b: 172.16.0.0/12 private_c: 192.168.0.0/16 link: 169.254.0.0/16

$uploadDebug

undocumented class variable

protected string $uploadDebug = ''

$uploadTempPath

Temp dir path for Upload

protected string $uploadTempPath = ''

$urlUploadFilter

Callable function for URL upload filter The first argument is a URL and the second argument is an instance of the elFinder class A filter should be return true (to allow) / false (to disallow)

protected callable $urlUploadFilter = \null
Tags
default

null

$volumes

Storages (root dirs)

protected array<string|int, mixed> $volumes = array()

$seekableUrlFps

Seekable URL file pointer ids - for getStreamByUrl()

private static array<string|int, mixed> $seekableUrlFps = array()

$sessionClosed

Is session closed

private static bool $sessionClosed = \false

$toastMessages

Toast messages of runtime notification

private array<string|int, mixed> $toastMessages = array()

$toastParams

Toast params of runtime notification

private array<string|int, mixed> $toastParams = array()

$utf8Encoder

Optional UTF-8 encoder

private mixed $utf8Encoder = \null
Tags
@var

callable || null

Methods

__construct()

Constructor

public __construct(mixed $opts) : mixed
Parameters
$opts : mixed
Tags
author

Dmitry (dio) Levashov

aborted()

Return bool that current request was aborted by client side

public static aborted() : bool
Return values
bool

bind()

Add handler to elFinder command

public bind(mixed $cmd, mixed $handler) : elFinder
Parameters
$cmd : mixed
$handler : mixed
Tags
author

Dmitry (dio) Levashov

Return values
elFinder

commandArgsList()

Return command required arguments info

public commandArgsList(mixed $cmd) : array<string|int, mixed>
Parameters
$cmd : mixed
Tags
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

commandExists()

Return true if command exists

public commandExists(mixed $cmd) : bool
Parameters
$cmd : mixed
Tags
author

Dmitry (dio) Levashov

Return values
bool

curlExec()

Call curl_exec() with supported redirect on `safe_mode` or `open_basedir`

public static curlExec(resource $curl[, array<string|int, mixed> $options = array() ][, array<string|int, mixed> $headers = array() ][, array<string|int, mixed> $postData = array() ]) : mixed
Parameters
$curl : resource
$options : array<string|int, mixed> = array()
$headers : array<string|int, mixed> = array()
$postData : array<string|int, mixed> = array()
Tags
throws
Exception
author

Naoki Sawada

error()

Normalize error messages

public error() : array<string|int, mixed>
Tags
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

exec()

Exec command and return result

public exec(string $cmd, array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
$cmd : string

command name

$args : array<string|int, mixed>

command arguments

Tags
throws
elFinderAbortException|Exception
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

expandMemoryForGD()

Auto expand memory for GD processing

public static expandMemoryForGD(array<string|int, mixed> $imgInfos) : mixed
Parameters
$imgInfos : array<string|int, mixed>

The image infos

extendTimeLimit()

Extend PHP execution time limit and also check connection is aborted

public static extendTimeLimit([int $time = null ]) : void
Parameters
$time : int = null
Tags
throws
elFinderAbortException

filenameDecontaminate()

Decontaminate of filename

public static filenameDecontaminate(string $name) : string
Parameters
$name : string

The name

Return values
string

Decontaminated filename

getApiFullVersion()

Return full version of API that this connector supports all functions

public static getApiFullVersion() : string
Return values
string

getCommonTempPath()

Return self::$commonTempPath

public static getCommonTempPath() : string
Return values
string

The common temporary path.

getConnectorUrl()

Get script url.

public static getConnectorUrl() : string
Tags
author

Naoki Sawada

Return values
string

full URL

getFetchCookieFile()

Gets the fetch cookie file for curl.

public getFetchCookieFile() : string
Return values
string

The fetch cookie file.

getIniBytes()

Return bytes from php.ini value

public static getIniBytes([string $iniName = '' ][, string $val = '' ]) : number
Parameters
$iniName : string = ''
$val : string = ''
Return values
number

getMemorySizeByImageInfo()

Gets the memory size by imageinfo.

public static getMemorySizeByImageInfo(array<string|int, mixed> $imgInfo) : int
Parameters
$imgInfo : array<string|int, mixed>

array that result of getimagesize()

Return values
int

The memory size by imageinfo.

getStaticVar()

Return elFinder static variable

public static getStaticVar(mixed $key) : mixed|null
Parameters
$key : mixed
Return values
mixed|null

getStreamByUrl()

Get stream resource pointer by URL

public static getStreamByUrl(array<string|int, mixed> $data[, int $redirectLimit = 5 ]) : resource|bool
Parameters
$data : array<string|int, mixed>

array('target'=>'URL', 'headers' => array())

$redirectLimit : int = 5
Tags
author

Naoki Sawada

Return values
resource|bool

GlobGC()

Garbage collection with glob

public static GlobGC(string $pattern, int $time) : mixed
Parameters
$pattern : string
$time : int

isAnimationGif()

Return Is Animation Gif

public static isAnimationGif(string $path) : bool
Parameters
$path : string

server local path of target image

Return values
bool

isAnimationPng()

Return Is Animation Png

public static isAnimationPng(string $path) : bool
Parameters
$path : string

server local path of target image

Return values
bool

isSeekableStream()

Return Is seekable stream resource

public static isSeekableStream(resource $resource) : bool
Parameters
$resource : resource
Return values
bool

isSeekableUrl()

Determines whether the specified resource is seekable url.

public static isSeekableUrl(mixed $resource) : bool
Parameters
$resource : mixed
Return values
bool

True if the specified resource is seekable url, False otherwise.

itemAutoUnlock()

unlock locked items on command completion

public itemAutoUnlock() : void

loaded()

Return true if fm init correctly

public loaded() : bool
Tags
author

Dmitry (dio) Levashov

Return values
bool

onShutdown()

Call back function on shutdown - delete files in $GLOBALS['elFinderTempFiles']

public static onShutdown() : mixed

phpErrorHandler()

PHP error handler, catch error types only E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE

public static phpErrorHandler(int $errno, string $errstr, string $errfile, int $errline) : bool
Parameters
$errno : int
$errstr : string
$errfile : string
$errline : int
Return values
bool

procExec()

Execute shell command

public static procExec(string $command[, string &$output = '' ][, int &$return_var = -1 ][, string &$error_output = '' ][, null $cwd = null ]) : int
Parameters
$command : string

command line

$output : string = ''

stdout strings

$return_var : int = -1

process exit code

$error_output : string = ''

stderr strings

$cwd : null = null

cwd

Tags
throws
elFinderAbortException
author

Alexey Sukhotin

Return values
int

exit code

realpath()

Return file real path

public realpath(string $hash) : string
Parameters
$hash : string

file hash

Tags
author

Dmitry (dio) Levashov

Return values
string

removeCustomData()

Removes a custom data.

public removeCustomData(string $key) : self
Parameters
$key : string

The key

Return values
self

( elFinder instance )

removeUrlContentSaveId()

remove of session var "urlContentSaveIds"

public removeUrlContentSaveId(string $id) : mixed
Parameters
$id : string

revision()

Return revision (api) number

public revision() : string
Tags
author

Naoki Sawada

Return values
string

rewind()

Rewind stream resource

public static rewind(resource $resource) : void
Parameters
$resource : resource

rmFileInDisconnected()

Remove a file if connection is disconnected

public static rmFileInDisconnected(string $file) : mixed
Parameters
$file : string

sessionDataDecode()

base64_decode and unserialize of session data (If needed)

public static sessionDataDecode(mixed &$var[, bool $checkIs = null ]) : bool|mixed
Parameters
$var : mixed

target variable

$checkIs : bool = null

data type for check (array|string|object|int)

Tags
author

Naoki Sawada

Return values
bool|mixed

sessionDataEncode()

serialize and base64_encode of session data (If needed)

public static sessionDataEncode(mixed $var) : mixed|string
Parameters
$var : mixed

target variable

Tags
author

Naoki Sawada

Return values
mixed|string

sessionWrite()

Call session_write_close() if session is restarted

public static sessionWrite() : void

setCustomData()

Sets custom data(s).

public setCustomData(string|array<string|int, mixed> $key[, mixed $val = null ]) : self
Parameters
$key : string|array<string|int, mixed>

The key or data array

$val : mixed = null

The value

Return values
self

( elFinder instance )

setToastErrorHandler()

Sets the toast error handler.

public setToastErrorHandler(array<string|int, mixed> $opts) : mixed
Parameters
$opts : array<string|int, mixed>

The options

splitFileExtention()

Return array ["name without extention", "extention"] by filename

public static splitFileExtention(string $name) : array<string|int, mixed>
Parameters
$name : string
Return values
array<string|int, mixed>

trigger()

Trigger binded functions

public trigger(string $cmd, array<string|int, mixed> $vars, array<string|int, mixed> &$errors) : mixed
Parameters
$cmd : string

binded command name

$vars : array<string|int, mixed>

variables to pass to listeners

$errors : array<string|int, mixed>

array into which the error is written

unbind()

Remove event (command exec) handler

public unbind(mixed $cmd, mixed $handler) : elFinder
Parameters
$cmd : mixed
$handler : mixed
Tags
author

Dmitry (dio) Levashov

Return values
elFinder

updateNetVolumeOption()

Update sesstion value of a NetVolume option

public updateNetVolumeOption(string $netKey, string $optionKey, mixed $val) : bool
Parameters
$netKey : string
$optionKey : string
$val : mixed
Return values
bool

utf8Encode()

String encode convert to UTF-8

public utf8Encode(string $str) : string
Parameters
$str : string

Input string

Return values
string

UTF-8 string

version()

Return version (api) number

public version() : string
Tags
author

Dmitry (dio) Levashov

Return values
string

xKilobyte()

Return X 1KByte

public static xKilobyte(int|string $val) : number
Parameters
$val : int|string

The value

Return values
number

abort()

Abort current request and make flag file to running check

protected abort([array<string|int, mixed> $args = array() ]) : void
Parameters
$args : array<string|int, mixed> = array()

addSubToBindName()

Add subName to commandName

protected static addSubToBindName(string $cmd, string $sub) : string
Parameters
$cmd : string
$sub : string
Return values
string

archive()

Create archive

protected archive(array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>

command arguments

Tags
throws
Exception
author

Dmitry (dio) Levashov,

author

Alexey Sukhotin

Return values
array<string|int, mixed>

callback()

Output callback result with JavaScript that control elFinder or HTTP redirect to callbackWindowURL

protected callback(mixed $args) : mixed
Parameters
$args : mixed
Tags
throws
elFinderAbortException
author

Naoki Sawada

chmod()

chmod

protected chmod(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
throws
elFinderAbortException
author

David Bartle

Return values
array<string|int, mixed>

curl_get_contents()

Get remote contents with cURL

protected curl_get_contents(string &$url, int $timeout, int $redirect_max, string $ua, resource $outfp, mixed $info) : mixed
Parameters
$url : string

target url

$timeout : int

timeout (sec)

$redirect_max : int

redirect max count

$ua : string
$outfp : resource
$info : mixed
Tags
@return

string, resource or bool(false)

retval

string contents

retval

resource conttents

retval

false error

author

Naoki Sawada

detectFileExtension()

Detect file type extension by local path

protected detectFileExtension(object $volume, string $path, string $name) : string
Parameters
$volume : object

elFinderVolumeDriver instance

$path : string

Local path

$name : string

Filename to save

Tags
author

Naoki Sawada

Return values
string

file type extension with dot

detectMimeType()

Detect file MIME Type by local path

protected detectMimeType(string $path) : string
Parameters
$path : string

Local path

Tags
author

Naoki Sawada

Return values
string

file MIME Type

dim()

Return image dimensions

protected dim(array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>

command arguments

Tags
throws
ImagickException
throws
elFinderAbortException
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

duplicate()

Duplicate file - create copy with "copy %d" suffix

protected duplicate(array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>

command arguments

Tags
throws
elFinderAbortException
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

editor()

Gateway for custom contents editor

protected editor([array<string|int, mixed> $args = array() ]) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed> = array()

command arguments

Tags
author

Naoki Sawada

Return values
array<string|int, mixed>

ensureDirsRecursively()

Ensure directories recursively

protected ensureDirsRecursively(object $volume, string $target, array<string|int, mixed> $dirs[, string $path = '' ]) : array<string|int, mixed>|false
Parameters
$volume : object

Volume object

$target : string

Target hash

$dirs : array<string|int, mixed>

Array of directory tree to ensure

$path : string = ''

Relative path form target hash

Tags
author

Naoki Sawada

Return values
array<string|int, mixed>|false

array('stats' => array([stat of maked directory]), 'hashes' => array('[path]' => '[hash]'), 'makes' => array([New directory hashes]), 'error' => array([Error name]))

extract()

Extract files from archive

protected extract(array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>

command arguments

Tags
author

Dmitry (dio) Levashov,

author

Alexey Sukhotin

Return values
array<string|int, mixed>

file()

Required to output file in browser when volume URL is not set Return array contains opened file pointer, root itself and required headers

protected file(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
throws
elFinderAbortException
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

filter()

Remove from files list hidden files and files with required mime types

protected filter(array<string|int, mixed> $files) : array<string|int, mixed>
Parameters
$files : array<string|int, mixed>

files info

Tags
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

fsock_get_contents()

Get remote contents with fsockopen()

protected fsock_get_contents(string &$url, int $timeout, int $redirect_max, string $ua, resource $outfp, mixed $info) : mixed
Parameters
$url : string

url

$timeout : int

timeout (sec)

$redirect_max : int

redirect max count

$ua : string
$outfp : resource
$info : mixed
Tags
@return

string, resource or bool(false)

retval

string contents

retval

resource conttents

retval

false error

throws
elFinderAbortException
author

Naoki Sawada

get()

Return file content

protected get(array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>

command arguments

Tags
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

get_remote_contents()

Get remote contents

protected get_remote_contents(string &$url[, int $timeout = 30 ][, int $redirect_max = 5 ][, string $ua = 'Mozilla/5.0' ][, resource $fp = null ]) : mixed
Parameters
$url : string

target url

$timeout : int = 30

timeout (sec)

$redirect_max : int = 5

redirect max count

$ua : string = 'Mozilla/5.0'
$fp : resource = null
Tags
@return

string, resource or bool(false)

retval

string contents

retval

resource conttents

rettval

false error

author

Naoki Sawada

getCmdOfBind()

Get command name of binded "commandName.subName"

protected static getCmdOfBind(string $cmd) : string
Parameters
$cmd : string
Return values
string

getNetVolumes()

Return network volumes config.

protected getNetVolumes() : array<string|int, mixed>
Tags
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

getNetVolumeUniqueId()

Return Network mount volume unique ID

protected getNetVolumeUniqueId([array<string|int, mixed> $netVolumes = null ][, string $prefix = 'nm' ]) : string|false
Parameters
$netVolumes : array<string|int, mixed> = null

Saved netvolumes array

$prefix : string = 'nm'

Id prefix

Tags
author

Naoki Sawada

Return values
string|false

getPluginInstance()

Get plugin instance & set to $this->plugins

protected getPluginInstance(string $name[, array<string|int, mixed> $opts = array() ]) : object|bool
Parameters
$name : string

Plugin name (dirctory name)

$opts : array<string|int, mixed> = array()

Plugin options (optional)

Tags
author

Naoki Sawada

Return values
object|bool

Plugin object instance Or false

hashes()

Return fils hashes list

protected hashes(array<string|int, mixed> $files) : array<string|int, mixed>
Parameters
$files : array<string|int, mixed>

files info

Tags
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

info()

Return file info (used by client "places" ui)

protected info(array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>

command arguments

Tags
throws
elFinderAbortException
author

Dmitry Levashov

Return values
array<string|int, mixed>

itemLock()

Do lock target item

protected itemLock(array<string|int, mixed>|string $hashes[, bool $autoUnlock = true ]) : void
Parameters
$hashes : array<string|int, mixed>|string
$autoUnlock : bool = true

itemLocked()

Is item locked?

protected itemLocked(string $hash) : bool
Parameters
$hash : string
Return values
bool

itemUnlock()

Do unlock target item

protected itemUnlock(string $hash) : bool
Parameters
$hash : string
Return values
bool

ls()

Return dir files names list

protected ls(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

mkdir()

Create directory

protected mkdir(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

mkfile()

Create empty file

protected mkfile(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

open()

"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

protected open(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
throws
elFinderAbortException
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

parents()

Return parents dir for required directory

protected parents(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
throws
elFinderAbortException
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

parse_data_scheme()

Parse Data URI scheme

protected parse_data_scheme(string $str, array<string|int, mixed> $extTable[, array<string|int, mixed> $args = null ]) : array<string|int, mixed>
Parameters
$str : string
$extTable : array<string|int, mixed>
$args : array<string|int, mixed> = null
Tags
author

Naoki Sawada

Return values
array<string|int, mixed>

paste()

Copy/move files into new destination

protected paste(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
throws
elFinderAbortException
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

put()

Save content into text file

protected put(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

removeNetVolume()

Remove netmount volume

protected removeNetVolume(string $key, object $volume) : bool
Parameters
$key : string

netvolume key

$volume : object

volume driver instance

Return values
bool

rename()

Rename file, Accept multiple items >= API 2.1031

protected rename(array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>
Tags
throws
elFinderAbortException
author

Dmitry (dio) Levashov

author

Naoki Sawada

Return values
array<string|int, mixed>

resize()

Resize image

protected resize(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
throws
ImagickException
throws
elFinderAbortException
author

Dmitry (dio) Levashov

author

Alexey Sukhotin

Return values
array<string|int, mixed>

rm()

Remove dirs/files

protected rm(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
throws
elFinderAbortException
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

saveNetVolumes()

Save network volumes config.

protected saveNetVolumes(array<string|int, mixed> $volumes) : void
Parameters
$volumes : array<string|int, mixed>

volumes config

Tags
author

Dmitry (dio) Levashov

Search files

protected search(array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>

command arguments

Tags
throws
elFinderAbortException
author

Dmitry Levashov

Return values
array<string|int, mixed>

size()

Count total files size

protected size(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
throws
elFinderAbortException
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

subdirs()

Return has subdirs

protected subdirs(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
author

Dmitry Naoki Sawada

Return values
array<string|int, mixed>

tmb()

Return new created thumbnails list

protected tmb(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
throws
ImagickException
throws
elFinderAbortException
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

toArray()

Return files info array

protected toArray(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>

one file info or files info

Tags
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

toastErrorHandler()

Error handler for send toast message to client side

protected toastErrorHandler(int $errno, string $errstr, string $errfile, int $errline) : bool
Parameters
$errno : int
$errstr : string
$errfile : string
$errline : int
Return values
bool

tree()

Return subdirs for required directory

protected tree(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

upload()

Save uploaded files

protected upload(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
throws
elFinderAbortException
author

Dmitry (dio) Levashov

Return values
array<string|int, mixed>

url()

Return content URL

protected url(array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>

command arguments

Tags
author

Naoki Sawada

Return values
array<string|int, mixed>

validate_address()

Validate an URL to prevent SSRF attacks.

protected validate_address(string $url) : false|array<string|int, mixed>

To prevent any risk of DNS rebinding, always use the IP address resolved by this method, as returned in the array entry ip.

Parameters
$url : string
Return values
false|array<string|int, mixed>

zipdl()

Download files/folders as an archive file 1st: Return srrsy contains download archive file info 2nd: Return array contains opened file pointer, root itself and required headers

protected zipdl(mixed $args) : array<string|int, mixed>
Parameters
$args : mixed
Tags
throws
Exception
author

Naoki Sawada

Return values
array<string|int, mixed>

checkChunkedFile()

Check chunked upload files

private checkChunkedFile(string $tmpname, string $chunk, string $cid, string $tempDir[, null $volume = null ]) : array<string|int, mixed>|null
Parameters
$tmpname : string

uploaded temporary file path

$chunk : string

uploaded chunk file name

$cid : string

uploaded chunked file id

$tempDir : string

temporary dirctroy path

$volume : null = null
Tags
throws
elFinderAbortException
author

Naoki Sawada

Return values
array<string|int, mixed>|null

getTempDir()

Get temporary directory path

private getTempDir([string $volumeTempPath = null ]) : string
Parameters
$volumeTempPath : string = null
Tags
author

Naoki Sawada

Return values
string

        
On this page

Search results