PHP Класс Contao\FileUpload

Наследование: extends Backend
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$blnHasError boolean Error indicator
$blnHasResized boolean Resized indicator
$strName string Field name

Открытые методы

Метод Описание
__construct ( ) Make the constructor public
generateMarkup ( ) : string Generate the markup for the default uploader
hasError ( ) : boolean Return true if there was an error
hasResized ( ) : boolean Return true if there was a resized image
setName ( string $strName ) Override the field name
uploadTo ( string $strTarget ) : array Check the uploaded files and move them to the target directory

Защищенные методы

Метод Описание
getFilesFromGlobal ( ) : array Get the files from the global $_FILES array
getMaximumUploadSize ( ) : string Return the maximum upload file size in bytes
resizeUploadedImage ( string $strImage ) : boolean Resize an uploaded image if neccessary

Описание методов

__construct() публичный Метод

Make the constructor public
public __construct ( )

generateMarkup() публичный Метод

Generate the markup for the default uploader
public generateMarkup ( ) : string
Результат string

getFilesFromGlobal() защищенный Метод

Get the files from the global $_FILES array
protected getFilesFromGlobal ( ) : array
Результат array

getMaximumUploadSize() защищенный Метод

Return the maximum upload file size in bytes
protected getMaximumUploadSize ( ) : string
Результат string

hasError() публичный Метод

Return true if there was an error
public hasError ( ) : boolean
Результат boolean

hasResized() публичный Метод

Return true if there was a resized image
public hasResized ( ) : boolean
Результат boolean

resizeUploadedImage() защищенный Метод

Resize an uploaded image if neccessary
protected resizeUploadedImage ( string $strImage ) : boolean
$strImage string
Результат boolean

setName() публичный Метод

Override the field name
public setName ( string $strName )
$strName string

uploadTo() публичный Метод

Check the uploaded files and move them to the target directory
public uploadTo ( string $strTarget ) : array
$strTarget string
Результат array

Описание свойств

$blnHasError защищенное свойство

Error indicator
protected bool $blnHasError
Результат boolean

$blnHasResized защищенное свойство

Resized indicator
protected bool $blnHasResized
Результат boolean

$strName защищенное свойство

Field name
protected string $strName
Результат string