660. Class

660.1. Zend\Validator\File\ImageSize

Validator for the image size of a image file

660.1.1. Methods

660.1.1.1. __construct

__construct()

Sets validator options

Accepts the following option keys: - minheight - minwidth - maxheight - maxwidth

Parameters:array|Traversable

660.1.1.2. getMinWidth

getMinWidth()

Returns the minimum allowed width

Return type:integer

660.1.1.3. setMinWidth

setMinWidth()

Sets the minimum allowed width

Parameters:integer
Return type:ImageSize Provides a fluid interface
Throws :ExceptionInvalidArgumentException When minwidth is greater than maxwidth

660.1.1.4. getMaxWidth

getMaxWidth()

Returns the maximum allowed width

Return type:integer

660.1.1.5. setMaxWidth

setMaxWidth()

Sets the maximum allowed width

Parameters:integer
Return type:ImageSize Provides a fluid interface
Throws :ExceptionInvalidArgumentException When maxwidth is less than minwidth

660.1.1.6. getMinHeight

getMinHeight()

Returns the minimum allowed height

Return type:integer

660.1.1.7. setMinHeight

setMinHeight()

Sets the minimum allowed height

Parameters:integer
Return type:ImageSize Provides a fluid interface
Throws :ExceptionInvalidArgumentException When minheight is greater than maxheight

660.1.1.8. getMaxHeight

getMaxHeight()

Returns the maximum allowed height

Return type:integer

660.1.1.9. setMaxHeight

setMaxHeight()

Sets the maximum allowed height

Parameters:integer
Return type:ImageSize Provides a fluid interface
Throws :ExceptionInvalidArgumentException When maxheight is less than minheight

660.1.1.10. getImageMin

getImageMin()

Returns the set minimum image sizes

Return type:array

660.1.1.11. getImageMax

getImageMax()

Returns the set maximum image sizes

Return type:array

660.1.1.12. getImageWidth

getImageWidth()

Returns the set image width sizes

Return type:array

660.1.1.13. getImageHeight

getImageHeight()

Returns the set image height sizes

Return type:array

660.1.1.14. setImageMin

setImageMin()

Sets the minimum image size

Parameters:array – The minimum image dimensions
Return type:ImageSize Provides a fluent interface

660.1.1.15. setImageMax

setImageMax()

Sets the maximum image size

Parameters:array|Traversable – The maximum image dimensions
Return type:ImageSize Provides a fluent interface

660.1.1.16. setImageWidth

setImageWidth()

Sets the minimum and maximum image width

Parameters:array – The image width dimensions
Return type:ImageSize Provides a fluent interface

660.1.1.17. setImageHeight

setImageHeight()

Sets the minimum and maximum image height

Parameters:array – The image height dimensions
Return type:ImageSize Provides a fluent interface

660.1.1.18. isValid

isValid()

Returns true if and only if the image size of $value is at least min and not bigger than max

Parameters:string|array – Real file to check for image size
Return type:bool

660.1.2. Constants

660.1.2.1. WIDTH_TOO_BIG

@const string Error constants

660.1.2.2. WIDTH_TOO_SMALL

660.1.2.3. HEIGHT_TOO_BIG

660.1.2.4. HEIGHT_TOO_SMALL

660.1.2.5. NOT_DETECTED

660.1.2.6. NOT_READABLE