Public Member Functions |
| __construct ($options) |
| getImageMin () |
| getImageMax () |
| getImageWidth () |
| getImageHeight () |
| setImageMin ($options) |
| setImageMax ($options) |
| setImageWidth ($options) |
| setImageHeight ($options) |
| isValid ($value, $file=null) |
Data Fields |
const | WIDTH_TOO_BIG = 'fileImageSizeWidthTooBig' |
const | WIDTH_TOO_SMALL = 'fileImageSizeWidthTooSmall' |
const | HEIGHT_TOO_BIG = 'fileImageSizeHeightTooBig' |
const | HEIGHT_TOO_SMALL = 'fileImageSizeHeightTooSmall' |
const | NOT_DETECTED = 'fileImageSizeNotDetected' |
const | NOT_READABLE = 'fileImageSizeNotReadable' |
Protected Member Functions |
| _throw ($file, $errorType) |
Protected Attributes |
| $_messageTemplates |
| $_messageVariables |
| $_minwidth |
| $_maxwidth |
| $_minheight |
| $_maxheight |
| $_width |
| $_height |
Detailed Description
Definition at line 35 of file ImageSize.php.
Constructor & Destructor Documentation
__construct |
( |
$ |
options ) |
|
Sets validator options
Accepts the following option keys:
- minheight
- minwidth
- maxheight
- maxwidth
- Parameters:
-
- Returns:
- void
Definition at line 125 of file ImageSize.php.
Member Function Documentation
_throw |
( |
$ |
file, |
|
|
$ |
errorType |
|
) |
| [protected] |
Throws an error of the given type
- Parameters:
-
string | $file | |
string | $errorType | |
- Returns:
- false
Definition at line 357 of file ImageSize.php.
Returns the set image height sizes
- Returns:
- array
Definition at line 193 of file ImageSize.php.
Returns the set maximum image sizes
- Returns:
- array
Definition at line 173 of file ImageSize.php.
Returns the set minimum image sizes
- Returns:
- array
Definition at line 163 of file ImageSize.php.
Returns the set image width sizes
- Returns:
- array
Definition at line 183 of file ImageSize.php.
isValid |
( |
$ |
value, |
|
|
$ |
file = null |
|
) |
| |
Defined by Zend_Validate_Interface
Returns true if and only if the imagesize of $value is at least min and not bigger than max
- Parameters:
-
string | $value | Real file to check for image size |
array | $file | File data from Zend_File_Transfer |
- Returns:
- boolean
Definition at line 310 of file ImageSize.php.
setImageHeight |
( |
$ |
options ) |
|
setImageMax |
( |
$ |
options ) |
|
setImageMin |
( |
$ |
options ) |
|
setImageWidth |
( |
$ |
options ) |
|
Field Documentation
$_messageTemplates [protected] |
Initial value: array(
self::WIDTH_TOO_BIG => "Maximum allowed width for image '%value%' should be '%maxwidth%' but '%width%' detected",
self::WIDTH_TOO_SMALL => "Minimum expected width for image '%value%' should be '%minwidth%' but '%width%' detected",
self::HEIGHT_TOO_BIG => "Maximum allowed height for image '%value%' should be '%maxheight%' but '%height%' detected",
self::HEIGHT_TOO_SMALL => "Minimum expected height for image '%value%' should be '%minheight%' but '%height%' detected",
self::NOT_DETECTED => "The size of image '%value%' could not be detected",
self::NOT_READABLE => "The image '%value%' can not be read"
)
Reimplemented from Zend_Validate_Abstract.
Definition at line 50 of file ImageSize.php.
$_messageVariables [protected] |
Initial value: array(
'minwidth' => '_minwidth',
'maxwidth' => '_maxwidth',
'minheight' => '_minheight',
'maxheight' => '_maxheight',
'width' => '_width',
'height' => '_height'
)
Reimplemented from Zend_Validate_Abstract.
Definition at line 62 of file ImageSize.php.
The documentation for this class was generated from the following file:
- E:/E/GEAMP/www/openbiz/openbiz/others/Zend/Validate/File/ImageSize.php