Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Validator for the image size of a image file
WIDTH_TOO_BIG = 'fileImageSizeWidthTooBig'
WIDTH_TOO_SMALL = 'fileImageSizeWidthTooSmall'
HEIGHT_TOO_BIG = 'fileImageSizeHeightTooBig'
HEIGHT_TOO_SMALL = 'fileImageSizeHeightTooSmall'
NOT_DETECTED = 'fileImageSizeNotDetected'
NOT_READABLE = 'fileImageSizeNotReadable'
integer $_height = ''
Detected height
integer $_maxheight = ''
Maximum image height
integer $_maxwidth = ''
Maximum image width
array $_messageTemplates = 'array'
array $_messageVariables = 'array'
integer $_minheight = ''
Minimum image height
integer $_minwidth = ''
Minimum image width
integer $_width = ''
Detected width
__construct(
Zend_Config|array $options
)
:
void
Sets validator options
Accepts the following option keys: - minheight - minwidth - maxheight - maxwidth
_throw(
string $file, string $errorType
)
:
false
Throws an error of the given type
getImageHeight(
)
:
array
Returns the set image height sizes
getImageMax(
)
:
array
Returns the set maximum image sizes
getImageMin(
)
:
array
Returns the set minimum image sizes
getImageWidth(
)
:
array
Returns the set image width sizes
isValid(
string $value, array $file
=
null
)
:
boolean
Defined by Zend_Validate_Interface
Returns true if and only if the imagesize of $value is at least min and not bigger than max
setImageHeight(
array $options
)
:
Zend_Validate_File_ImageSize
Sets the mimimum and maximum image height
setImageMax(
array $options
)
:
Zend_Validate_StringLength
Sets the maximum image size
setImageMin(
array $options
)
:
Zend_Validate_File_ImageSize
Sets the minimum image size
setImageWidth(
array $options
)
:
Zend_Validate_File_ImageSize
Sets the mimimum and maximum image width