1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс File

Открытые члены

 __construct ($package, array $file)
 getId ()
 getHash ()
 getName ()
 getSize ()
 getType ()
 getFile ($code)
 setFile ($code, $data)
 saveFile (&$file, Storable $storage, array $copies)
 saveLog ()
 addError (Error $error)
 hasError ()
 getErrorCollection ()
 setUploadStatus ($status)
 isUploaded ()
 setExecuteStatus ($status)
 isExecuted ()
 toArray ()
 fromArray (array $data)

Открытые статические члены

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())

Защищенные статические члены

static arrayWalkRecursive (array $array)
static getFromCache ($hash, $path)
static setIntoCache ($hash, $path, $data)
static getChunkKey ($chunksCount, $chunkNumber)

Защищенные данные

 $package
 $data = array()
 $errorCollection

Статические защищенные данные

static $http = null

Подробное описание

См. определение в файле file.php строка 15

Конструктор(ы)

◆ __construct()

__construct ( $package,
array $file )

File constructor.

Аргументы
Package$packagePackage for file.
array$fileFile array.

См. определение в файле file.php строка 31

Методы

◆ addError()

addError ( Error $error)

Adds error into errorConnection

Аргументы
Error$error
Возвращает
void

См. определение в файле file.php строка 280

◆ arrayWalkRecursive()

arrayWalkRecursive ( array $array)
staticprotected

Just function to prepare data array for saving on drive.

Аргументы
array$arrayData array.
Возвращает
array

См. определение в файле file.php строка 259

◆ checkFile()

checkFile ( & $file,
File $f,
$params )
static
Аргументы
$file
File$f
$params
Возвращает
Result

См. определение в файле file.php строка 592

◆ createCanvas()

createCanvas ( $source,
$dest,
$canvasParams = array(),
$watermarkParams = array() )
static
Аргументы
array$sourceSource file.
array$destDestination File.
array$canvasParamsArray("width" => 100, "height" => 100).
array$watermarkParamsArray("position" => "top", "type" => "text", "text" => "Bla-bla", "font" => "", "color" => "red").
Возвращает
array

См. определение в файле file.php строка 695

◆ deleteCache()

deleteCache ( Package $package,
array $file )
static
Аргументы
Package$package
array$file
Возвращает
void

См. определение в файле file.php строка 334

◆ deleteFile()

deleteFile ( $cid,
$hash,
$path )
static
Аргументы
string$cidControl exemplar ID.
string$hashFile ID.
string$pathPath to temporary directory.
Возвращает
bool

См. определение в файле file.php строка 450

◆ fromArray()

fromArray ( array $data)

Restore data from array and saves into cache.

Аргументы
array$data
Возвращает
void

См. определение в файле file.php строка 436

◆ getChunkKey()

getChunkKey ( $chunksCount,
$chunkNumber )
staticprotected

Generates hash from info about file

Аргументы
$chunksCount
$chunkNumber
Возвращает
string

См. определение в файле file.php строка 682

◆ getErrorCollection()

getErrorCollection ( )

Returns error collection.

Возвращает
ErrorCollection

См. определение в файле file.php строка 298

◆ getFile()

getFile ( $code)

Returns file data array.

Аргументы
string$codeFile code like "default", "real_picture".
Возвращает
array|null

См. определение в файле file.php строка 125

◆ getFromCache()

getFromCache ( $hash,
$path )
staticprotected

Return data array from cache.

Аргументы
string$hash
string$path
Возвращает
array|false

См. определение в файле file.php строка 324

◆ getHash()

getHash ( )
Возвращает
string

См. определение в файле file.php строка 95

◆ getId()

getId ( )
Возвращает
string

См. определение в файле file.php строка 87

◆ getName()

getName ( )
Возвращает
string

См. определение в файле file.php строка 102

◆ getSize()

getSize ( )
Возвращает
integer

См. определение в файле file.php строка 109

◆ getType()

getType ( )
Возвращает
string

См. определение в файле file.php строка 116

◆ getUploadErrorMessage()

getUploadErrorMessage ( $error)
static
Аргументы
$error
Возвращает
string

См. определение в файле file.php строка 541

◆ getUrlFromRelativePath()

getUrlFromRelativePath ( $tmpName)
static

См. определение в файле file.php строка 520

◆ hasError()

hasError ( )

Checks if errorCollection has errors.

Возвращает
bool

См. определение в файле file.php строка 289

◆ http()

http ( )
static
Возвращает
HttpClient

См. определение в файле file.php строка 576

◆ initHash()

initHash ( $file = array())
static
Аргументы
array$fileFile array("id" => ... ).
Возвращает
string

См. определение в файле file.php строка 75

◆ isExecuted()

isExecuted ( )

Check if file is executed.

Возвращает
bool

См. определение в файле file.php строка 417

◆ isUploaded()

isUploaded ( )

Checks if file is uploaded.

Возвращает
bool

См. определение в файле file.php строка 397

◆ merge()

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

Аргументы
$res
$res2
Возвращает
array

См. определение в файле file.php строка 368

◆ saveFile()

saveFile ( & $file,
Storable $storage,
array $copies )

Saves file on drive.

Аргументы
array$fileArray("name" => "", "code" => ..., "type" => ..., "uploadStatus" => "inprogress",...).
Storable$storage.
array$copiesArray("small" => array("width" => 100, "height" => 100)).
Возвращает
Result

См. определение в файле file.php строка 148

◆ saveLog()

saveLog ( )

Saves changes into cache.

Возвращает
void

См. определение в файле file.php строка 244

◆ setExecuteStatus()

setExecuteStatus ( $status)

Sets executed status.

Аргументы
string$status
Возвращает
void

См. определение в файле file.php строка 407

◆ setFile()

setFile ( $code,
$data )

Sets file data in file with code $code and saves changes into cache.

Аргументы
string$codeFile code like "default", "real_picture".
array$dataArray("name" => "", "code" => ..., "type" => ..., "uploadStatus" => "inprogress",...).
Возвращает
void

См. определение в файле file.php строка 135

◆ setIntoCache()

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.

Аргументы
string$status
Возвращает
void

См. определение в файле file.php строка 387

◆ toArray()

toArray ( )

Returns file whole data.

Возвращает
array

См. определение в файле file.php строка 426

◆ view()

view ( array $fileData,
$options = array() )
static
Аргументы
array$fileData
array$options
Возвращает
bool|mixed

@global \CMain $APPLICATION

См. определение в файле file.php строка 726

◆ viewFile()

viewFile ( $cid,
$hash,
$path )
static
Аргументы
string$cidControl exemplar ID.
string$hashFile ID.
string$pathPath to temporary directory.
Возвращает
void

См. определение в файле file.php строка 471

Поля

◆ $data

$data = array()
protected

См. определение в файле file.php строка 20

◆ $errorCollection

$errorCollection
protected

См. определение в файле file.php строка 22

◆ $http

$http = null
staticprotected

См. определение в файле file.php строка 24

◆ $package

$package
protected

См. определение в файле file.php строка 18


Объявления и описания членов класса находятся в файле:
  • C:/bitrix/modules/main/lib/ui/uploader/file.php