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'
Details WIDTH_TOO_SMALL = 'fileImageSizeWidthTooSmall'
Details HEIGHT_TOO_BIG = 'fileImageSizeHeightTooBig'
Details HEIGHT_TOO_SMALL = 'fileImageSizeHeightTooSmall'
Details NOT_DETECTED = 'fileImageSizeNotDetected'
Details NOT_READABLE = 'fileImageSizeNotReadable'
Detailsinteger $_height = ''Detected height
Detailsinteger $_maxheight = ''Maximum image height
Detailsinteger $_maxwidth = ''Maximum image width
Detailsarray $_messageTemplates = 'array'
Detailsarray $_messageVariables = 'array'
Detailsinteger $_minheight = ''Minimum image height
Detailsinteger $_minwidth = ''Minimum image width
Detailsinteger $_width = ''Detected width
Details__construct(
Zend_Config|array $options
)
:
voidSets validator options
Accepts the following option keys: - minheight - minwidth - maxheight - maxwidth
Details_throw(
string $file, string $errorType
)
:
falseThrows an error of the given type
DetailsgetImageHeight(
)
:
arrayReturns the set image height sizes
DetailsgetImageMax(
)
:
arrayReturns the set maximum image sizes
DetailsgetImageMin(
)
:
arrayReturns the set minimum image sizes
DetailsgetImageWidth(
)
:
arrayReturns the set image width sizes
DetailsisValid(
string $value, array $file
=
null
)
:
booleanDefined by Zend_Validate_Interface
Returns true if and only if the imagesize of $value is at least min and not bigger than max
DetailssetImageHeight(
array $options
)
:
Zend_Validate_File_ImageSizeSets the mimimum and maximum image height
DetailssetImageMax(
array $options
)
:
Zend_Validate_StringLengthSets the maximum image size
DetailssetImageMin(
array $options
)
:
Zend_Validate_File_ImageSizeSets the minimum image size
DetailssetImageWidth(
array $options
)
:
Zend_Validate_File_ImageSizeSets the mimimum and maximum image width
Details