Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct ($files=array()) | |
getFiles ($file=null) | |
setFiles ($files=array()) | |
isValid ($value, $file=null) | |
![]() | |
getMessages () | |
getMessageVariables () | |
getMessageTemplates () | |
setMessage ($messageString, $messageKey=null) | |
setMessages (array $messages) | |
__get ($property) | |
getErrors () | |
setObscureValue ($flag) | |
getObscureValue () | |
setTranslator ($translator=null) | |
getTranslator () | |
hasTranslator () | |
setDisableTranslator ($flag) | |
translatorIsDisabled () | |
![]() | |
isValid ($value) | |
Data Fields | |
const | INI_SIZE = 'fileUploadErrorIniSize' |
const | FORM_SIZE = 'fileUploadErrorFormSize' |
const | PARTIAL = 'fileUploadErrorPartial' |
const | NO_FILE = 'fileUploadErrorNoFile' |
const | NO_TMP_DIR = 'fileUploadErrorNoTmpDir' |
const | CANT_WRITE = 'fileUploadErrorCantWrite' |
const | EXTENSION = 'fileUploadErrorExtension' |
const | ATTACK = 'fileUploadErrorAttack' |
const | FILE_NOT_FOUND = 'fileUploadErrorFileNotFound' |
const | UNKNOWN = 'fileUploadErrorUnknown' |
Protected Member Functions | |
_throw ($file, $errorType) | |
![]() | |
_createMessage ($messageKey, $value) | |
_implodeRecursive (array $pieces) | |
_error ($messageKey, $value=null) | |
_setValue ($value) | |
Protected Attributes | |
$_messageTemplates | |
$_files = array() | |
![]() | |
$_value | |
$_messageVariables = array() | |
$_messageTemplates = array() | |
$_messages = array() | |
$_obscureValue = false | |
$_errors = array() | |
$_translator | |
$_translatorDisabled = false | |
Additional Inherited Members | |
![]() | |
static | setDefaultTranslator ($translator=null) |
static | getDefaultTranslator () |
static | hasDefaultTranslator () |
static | getMessageLength () |
static | setMessageLength ($length=-1) |
![]() | |
static | $_defaultTranslator |
static | $_messageLength = -1 |
Definition at line 35 of file Upload.php.
__construct | ( | $files = array() | ) |
Sets validator options
The array $files must be given in syntax of Zend_File_Transfer to be checked If no files are given the $_FILES array will be used automatically. NOTE: This validator will only work with HTTP POST uploads!
array | Zend_Config | $files | Array of files in syntax of Zend_File_Transfer |
Definition at line 83 of file Upload.php.
|
protected |
Throws an error of the given type
string | $file | |
string | $errorType |
Definition at line 236 of file Upload.php.
getFiles | ( | $file = null | ) |
Returns the array of set files
string | $file | (Optional) The file to return in detail |
Zend_Validate_Exception | If file is not found |
Definition at line 99 of file Upload.php.
isValid | ( | $value, | |
$file = null |
|||
) |
Defined by Zend_Validate_Interface
Returns true if and only if the file was uploaded without errors
string | $value | Single file to check for upload errors, when giving null the $_FILES array from initialization will be used |
string | null | $file |
Definition at line 162 of file Upload.php.
setFiles | ( | $files = array() | ) |
Sets the files to be checked
array | $files | The files to check in syntax of Zend_File_Transfer |
Definition at line 130 of file Upload.php.
|
protected |
Definition at line 72 of file Upload.php.
|
protected |
Definition at line 55 of file Upload.php.
const ATTACK = 'fileUploadErrorAttack' |
Definition at line 47 of file Upload.php.
const CANT_WRITE = 'fileUploadErrorCantWrite' |
Definition at line 45 of file Upload.php.
const EXTENSION = 'fileUploadErrorExtension' |
Definition at line 46 of file Upload.php.
const FILE_NOT_FOUND = 'fileUploadErrorFileNotFound' |
Definition at line 48 of file Upload.php.
const FORM_SIZE = 'fileUploadErrorFormSize' |
Definition at line 41 of file Upload.php.
const INI_SIZE = 'fileUploadErrorIniSize' |
#+ @const string Error constants
Definition at line 40 of file Upload.php.
const NO_FILE = 'fileUploadErrorNoFile' |
Definition at line 43 of file Upload.php.
const NO_TMP_DIR = 'fileUploadErrorNoTmpDir' |
Definition at line 44 of file Upload.php.
const PARTIAL = 'fileUploadErrorPartial' |
Definition at line 42 of file Upload.php.
const UNKNOWN = 'fileUploadErrorUnknown' |
Definition at line 49 of file Upload.php.