__construct()
getErrors()
getFileName()
getImageInfoField()
getTempFile()
getUploadedFile()
getUploadedFiles()
isImage()
isValid()
setConstraints()
_checkForErrors()
_checkImageState()
$_allowedExtensions
$_autoResize
$_errors
$_errorsChecked
$_extension
$_fileName
$_imageInfo
$_maxFileSize
$_maxHeight
$_maxWidth
$_tempFile
Core upload handler.
package | XenForo_Upload |
---|
__construct(string $fileName, string $tempFile)
string
User-supplied file name
string
Upload temporary file name; this can be an empty string to account for uploads that are too large
getErrors() : array
array
getFileName() : string
string
getImageInfoField(string $field) : mixed | false
string
mixed
false
Mixed scalar, or false if not an image or invalid fieldgetTempFile() : string
string
getUploadedFile(string $formField, array $source) : \XenForo_Upload
string
Name of the form field
array
null
Source array ($_FILES by default).
\XenForo_Upload
(or false)getUploadedFiles(string $formField, array $source) : array
string
Name of the form field
array
null
Source array ($_FILES by default).
array
Format: [] => XenForo_Upload objectsisImage() : boolean
boolean
isValid() : boolean
boolean
setConstraints(array $constraints)
Possible keys: * extensions - array of allowed extensions * size - max file size in bytes * width - max image width in pixels * height - max image height in pixels
array
See above for format.
_checkForErrors()
_checkImageState()
$_allowedExtensions : array
$_autoResize : boolean
$_errors : array
$_errorsChecked : boolean
$_extension : string
$_fileName : string
$_imageInfo : array | false | null
If null, state is unknown; if false, not an image. Otherwise, array with keys: * from getimagesize() * width/height/type
$_maxFileSize : integer
$_maxHeight : integer
$_maxWidth : integer
$_tempFile : string