ImageMaximumWidthHeight
extends UploadingFile
in package
Class ImageMaximumWidthHeight
Tags
Table of Contents
- $file : string
- Index in the $_FILES array
- $maximumHeight : int
- Maximum height of the image
- $maximumWidth : int
- Maximum width of the image
- __construct() : mixed
- Constructor
- getKey() : string
- Getter for the field $this->file
- setValidatingData() : void
- {@inheritdoc}
- valid() : bool
- {@inheritdoc}
- validateFilesFieldExists() : void
- Method validates that $_FILES[$field] exists.
Properties
$file
Index in the $_FILES array
private
string
$file
= ''
$maximumHeight
Maximum height of the image
private
int
$maximumHeight
= 0
$maximumWidth
Maximum width of the image
private
int
$maximumWidth
= 0
Methods
__construct()
Constructor
public
__construct(int $width, int $height) : mixed
Parameters
- $width : int
-
width constraint for the file
- $height : int
-
height constraint for the file
Tags
Return values
mixed —getKey()
Getter for the field $this->file
public
getKey() : string
Return values
string —field $this->file
setValidatingData()
{@inheritdoc}
public
setValidatingData(mixed $data) : void
Parameters
- $data : mixed
Tags
Return values
void —valid()
{@inheritdoc}
public
valid() : bool
Tags
Return values
bool —validateFilesFieldExists()
Method validates that $_FILES[$field] exists.
public
validateFilesFieldExists(string $field) : void
If it does not then exception will be thrown
Parameters
- $field : string
-
field name