|
static | initHash ($file=array()) |
|
static | deleteCache (Package $package, array $file) |
|
static | merge ($res, $res2) |
|
static | deleteFile ($cid, $hash, $path) |
|
static | viewFile ($cid, $hash, $path) |
|
static | getUrlFromRelativePath ($tmpName) |
|
static | getUploadErrorMessage ($error) |
|
static | http () |
|
static | checkFile (&$file, File $f, $params) |
|
static | createCanvas ($source, $dest, $canvasParams=array(), $watermarkParams=array()) |
|
static | view (array $fileData, $options=array()) |
|
См. определение в файле file.php строка 15
◆ __construct()
__construct |
( |
| $package, |
|
|
array | $file ) |
File constructor.
- Аргументы
-
Package | $package | Package for file. |
array | $file | File array. |
См. определение в файле file.php строка 31
◆ addError()
Adds error into errorConnection
- Аргументы
-
- Возвращает
- void
См. определение в файле file.php строка 280
◆ arrayWalkRecursive()
static arrayWalkRecursive |
( |
array | $array | ) |
|
|
staticprotected |
Just function to prepare data array for saving on drive.
- Аргументы
-
- Возвращает
- array
См. определение в файле file.php строка 259
◆ checkFile()
static checkFile |
( |
& | $file, |
|
|
File | $f, |
|
|
| $params ) |
|
static |
- Аргументы
-
- Возвращает
- Result
См. определение в файле file.php строка 592
◆ createCanvas()
static createCanvas |
( |
| $source, |
|
|
| $dest, |
|
|
| $canvasParams = array(), |
|
|
| $watermarkParams = array() ) |
|
static |
- Аргументы
-
array | $source | Source file. |
array | $dest | Destination File. |
array | $canvasParams | Array("width" => 100, "height" => 100). |
array | $watermarkParams | Array("position" => "top", "type" => "text", "text" => "Bla-bla", "font" => "", "color" => "red"). |
- Возвращает
- array
См. определение в файле file.php строка 695
◆ deleteCache()
static deleteCache |
( |
Package | $package, |
|
|
array | $file ) |
|
static |
- Аргументы
-
Package | $package | |
array | $file | |
- Возвращает
- void
См. определение в файле file.php строка 334
◆ deleteFile()
static deleteFile |
( |
| $cid, |
|
|
| $hash, |
|
|
| $path ) |
|
static |
- Аргументы
-
string | $cid | Control exemplar ID. |
string | $hash | File ID. |
string | $path | Path to temporary directory. |
- Возвращает
- bool
См. определение в файле file.php строка 450
◆ fromArray()
Restore data from array and saves into cache.
- Аргументы
-
- Возвращает
- void
См. определение в файле file.php строка 436
◆ getChunkKey()
static getChunkKey |
( |
| $chunksCount, |
|
|
| $chunkNumber ) |
|
staticprotected |
Generates hash from info about file
- Аргументы
-
$chunksCount | |
$chunkNumber | |
- Возвращает
- string
См. определение в файле file.php строка 682
◆ getErrorCollection()
Returns error collection.
- Возвращает
- ErrorCollection
См. определение в файле file.php строка 298
◆ getFile()
Returns file data array.
- Аргументы
-
string | $code | File code like "default", "real_picture". |
- Возвращает
- array|null
См. определение в файле file.php строка 125
◆ getFromCache()
static getFromCache |
( |
| $hash, |
|
|
| $path ) |
|
staticprotected |
Return data array from cache.
- Аргументы
-
- Возвращает
- array|false
См. определение в файле file.php строка 324
◆ getHash()
- Возвращает
- string
См. определение в файле file.php строка 95
◆ getId()
- Возвращает
- string
См. определение в файле file.php строка 87
◆ getName()
- Возвращает
- string
См. определение в файле file.php строка 102
◆ getSize()
- Возвращает
- integer
См. определение в файле file.php строка 109
◆ getType()
- Возвращает
- string
См. определение в файле file.php строка 116
◆ getUploadErrorMessage()
static getUploadErrorMessage |
( |
| $error | ) |
|
|
static |
- Аргументы
-
- Возвращает
- string
См. определение в файле file.php строка 541
◆ getUrlFromRelativePath()
static getUrlFromRelativePath |
( |
| $tmpName | ) |
|
|
static |
◆ hasError()
Checks if errorCollection has errors.
- Возвращает
- bool
См. определение в файле file.php строка 289
◆ http()
- Возвращает
- HttpClient
См. определение в файле file.php строка 576
◆ initHash()
static initHash |
( |
| $file = array() | ) |
|
|
static |
- Аргументы
-
array | $file | File array("id" => ... ). |
- Возвращает
- string
См. определение в файле file.php строка 75
◆ isExecuted()
Check if file is executed.
- Возвращает
- bool
См. определение в файле file.php строка 417
◆ isUploaded()
Checks if file is uploaded.
- Возвращает
- bool
См. определение в файле file.php строка 397
◆ merge()
static merge |
( |
| $res, |
|
|
| $res2 ) |
|
static |
this function just merge 2 arrays with a lot of deep keys array_merge replaces keys in second level and deeper array_merge_recursive multiplies similar keys
- Аргументы
-
- Возвращает
- array
См. определение в файле file.php строка 368
◆ saveFile()
saveFile |
( |
& | $file, |
|
|
Storable | $storage, |
|
|
array | $copies ) |
Saves file on drive.
- Аргументы
-
array | $file | Array("name" => "", "code" => ..., "type" => ..., "uploadStatus" => "inprogress",...). |
Storable | $storage | . |
array | $copies | Array("small" => array("width" => 100, "height" => 100)). |
- Возвращает
- Result
См. определение в файле file.php строка 148
◆ saveLog()
Saves changes into cache.
- Возвращает
- void
См. определение в файле file.php строка 244
◆ setExecuteStatus()
setExecuteStatus |
( |
| $status | ) |
|
Sets executed status.
- Аргументы
-
- Возвращает
- void
См. определение в файле file.php строка 407
◆ setFile()
Sets file data in file with code $code and saves changes into cache.
- Аргументы
-
string | $code | File code like "default", "real_picture". |
array | $data | Array("name" => "", "code" => ..., "type" => ..., "uploadStatus" => "inprogress",...). |
- Возвращает
- void
См. определение в файле file.php строка 135
◆ setIntoCache()
static setIntoCache |
( |
| $hash, |
|
|
| $path, |
|
|
| $data ) |
|
staticprotected |
Saves serialized data on disk.
- Аргументы
-
string | $hash | |
string | $path | |
array | $data | |
- Возвращает
- void
См. определение в файле file.php строка 353
◆ setUploadStatus()
setUploadStatus |
( |
| $status | ) |
|
Sets upload status.
- Аргументы
-
- Возвращает
- void
См. определение в файле file.php строка 387
◆ toArray()
Returns file whole data.
- Возвращает
- array
См. определение в файле file.php строка 426
◆ view()
static view |
( |
array | $fileData, |
|
|
| $options = array() ) |
|
static |
- Аргументы
-
array | $fileData | |
array | $options | |
- Возвращает
- bool|mixed
@global \CMain $APPLICATION
См. определение в файле file.php строка 726
◆ viewFile()
static viewFile |
( |
| $cid, |
|
|
| $hash, |
|
|
| $path ) |
|
static |
- Аргументы
-
string | $cid | Control exemplar ID. |
string | $hash | File ID. |
string | $path | Path to temporary directory. |
- Возвращает
- void
См. определение в файле file.php строка 471
◆ $data
◆ $errorCollection
◆ $http
◆ $package