| Fully Qualified Name: | Zend\Validator\File\ImageSize |
| Extends: | AbstractValidator |
Validator for the image size of an image file
| Name | Description | Defined By |
|---|---|---|
| __construct() | Sets validator options | ImageSize |
| __get() | Magic function returns the value of the requested property, if and only if it is the value or a message variable. | AbstractValidator |
| __invoke() | Invoke as command | AbstractValidator |
| getDefaultTranslator() | Get default translation object for all validate objects | AbstractValidator |
| getDefaultTranslatorTextDomain() | Get default translation text domain for all validate objects | AbstractValidator |
| getImageHeight() | Returns the set image height sizes | ImageSize |
| getImageMax() | Returns the set maximum image sizes | ImageSize |
| getImageMin() | Returns the set minimum image sizes | ImageSize |
| getImageWidth() | Returns the set image width sizes | ImageSize |
| getMaxHeight() | Returns the maximum allowed height | ImageSize |
| getMaxWidth() | Returns the maximum allowed width | ImageSize |
| getMessageLength() | Returns the maximum allowed message length | AbstractValidator |
| getMessageTemplates() | Returns the message templates from the validator | AbstractValidator |
| getMessageVariables() | Returns an array of the names of variables that are used in constructing validation failure messages | AbstractValidator |
| getMessages() | Returns array of validation failure messages | AbstractValidator |
| getMinHeight() | Returns the minimum allowed height | ImageSize |
| getMinWidth() | Returns the minimum allowed width | ImageSize |
| getOption() | Returns an option | AbstractValidator |
| getOptions() | Returns all available options | AbstractValidator |
| getTranslator() | Return translation object | AbstractValidator |
| getTranslatorTextDomain() | Return the translation text domain | AbstractValidator |
| hasDefaultTranslator() | Is there a default translation object set? | AbstractValidator |
| hasTranslator() | Does this validator have its own specific translator? | AbstractValidator |
| isTranslatorEnabled() | Is translation enabled? | AbstractValidator |
| isValid() | Returns true if and only if the image size of $value is at least min and not bigger than max | ImageSize |
| isValueObscured() | Retrieve flag indicating whether or not value should be obfuscated in messages | AbstractValidator |
| setDefaultTranslator() | Set default translation object for all validate objects | AbstractValidator |
| setDefaultTranslatorTextDomain() | Set default translation text domain for all validate objects | AbstractValidator |
| setImageHeight() | Sets the minimum and maximum image height | ImageSize |
| setImageMax() | Sets the maximum image size | ImageSize |
| setImageMin() | Sets the minimum image size | ImageSize |
| setImageWidth() | Sets the minimum and maximum image width | ImageSize |
| setMaxHeight() | Sets the maximum allowed height | ImageSize |
| setMaxWidth() | Sets the maximum allowed width | ImageSize |
| setMessage() | Sets the validation failure message template for a particular key | AbstractValidator |
| setMessageLength() | Sets the maximum allowed message length | AbstractValidator |
| setMessages() | Sets validation failure message templates given as an array, where the array keys are the message keys, and the array values are the message template strings. | AbstractValidator |
| setMinHeight() | Sets the minimum allowed height | ImageSize |
| setMinWidth() | Sets the minimum allowed width | ImageSize |
| setOptions() | Sets one or multiple options | AbstractValidator |
| setTranslator() | Set translation object | AbstractValidator |
| setTranslatorEnabled() | Indicate whether or not translation should be enabled | AbstractValidator |
| setTranslatorTextDomain() | Set translation text domain | AbstractValidator |
| setValueObscured() | Set flag indicating whether or not value should be obfuscated in messages | AbstractValidator |
Sets validator options
Accepts the following option keys:
| Parameter Name | Type | Description |
|---|---|---|
| $options | array|\Traversable |
Returns:
Magic function returns the value of the requested property, if and only if it is the value or a message variable.
| Parameter Name | Type | Description |
|---|---|---|
| $property | string |
Returns: mixed
Invoke as command
| Parameter Name | Type | Description |
|---|---|---|
| $value | mixed |
Returns: bool
Get default translation object for all validate objects
Returns: \Translator\TranslatorInterface|null
Get default translation text domain for all validate objects
Returns: string
Returns the set image height sizes
Returns: array
Returns the set maximum image sizes
Returns: array
Returns the set minimum image sizes
Returns: array
Returns the set image width sizes
Returns: array
Returns the maximum allowed height
Returns: int
Returns the maximum allowed width
Returns: int
Returns the maximum allowed message length
Returns: int
Returns the message templates from the validator
Returns: array
Returns an array of the names of variables that are used in constructing validation failure messages
Returns: array
Returns array of validation failure messages
Returns: array
Returns the minimum allowed height
Returns: int
Returns the minimum allowed width
Returns: int
Returns an option
| Parameter Name | Type | Description |
|---|---|---|
| $option | string | Option |
Returns: mixed Returned option
Returns all available options
Returns: array Array with all available options
Return translation object
Returns: \Translator\TranslatorInterface|null
Return the translation text domain
Returns: string
Is there a default translation object set?
Returns: bool
Does this validator have its own specific translator?
Returns: bool
Is translation enabled?
Returns: bool
Returns true if and only if the image size of $value is at least min and not bigger than max
| Parameter Name | Type | Description |
|---|---|---|
| $value | string|array | Real |
| $file | array | File |
Returns: bool
Retrieve flag indicating whether or not value should be obfuscated in messages
Returns: bool
Set default translation object for all validate objects
| Parameter Name | Type | Description |
|---|---|---|
| $translator | \Translator\TranslatorInterface|null | |
| $textDomain | string | (optional) |
Returns: void
Set default translation text domain for all validate objects
| Parameter Name | Type | Description |
|---|---|---|
| $textDomain | string |
Returns: void
Sets the minimum and maximum image height
| Parameter Name | Type | Description |
|---|---|---|
| $options | array | The |
Returns: self Provides a fluent interface
Sets the maximum image size
| Parameter Name | Type | Description |
|---|---|---|
| $options | array|\Traversable | The |
Returns: self Provides a fluent interface
Sets the minimum image size
| Parameter Name | Type | Description |
|---|---|---|
| $options | array | The |
Returns: self Provides a fluent interface
Sets the minimum and maximum image width
| Parameter Name | Type | Description |
|---|---|---|
| $options | array | The |
Returns: self Provides a fluent interface
Sets the maximum allowed height
| Parameter Name | Type | Description |
|---|---|---|
| $maxHeight | int |
Returns: self Provides a fluid interface
Sets the maximum allowed width
| Parameter Name | Type | Description |
|---|---|---|
| $maxWidth | int |
Returns: self Provides a fluid interface
Sets the validation failure message template for a particular key
| Parameter Name | Type | Description |
|---|---|---|
| $messageString | string | |
| $messageKey | string | OPTIONAL |
Returns: \AbstractValidator Provides a fluent interface
Sets the maximum allowed message length
| Parameter Name | Type | Description |
|---|---|---|
| $length | int |
Returns:
Sets validation failure message templates given as an array, where the array keys are the message keys, and the array values are the message template strings.
| Parameter Name | Type | Description |
|---|---|---|
| $messages | array |
Returns: \AbstractValidator
Sets the minimum allowed height
| Parameter Name | Type | Description |
|---|---|---|
| $minHeight | int |
Returns: self Provides a fluid interface
Sets the minimum allowed width
| Parameter Name | Type | Description |
|---|---|---|
| $minWidth | int |
Returns: self Provides a fluid interface
Sets one or multiple options
| Parameter Name | Type | Description |
|---|---|---|
| $options | array|\Traversable | Options |
Returns: \AbstractValidator Provides fluid interface
Set translation object
| Parameter Name | Type | Description |
|---|---|---|
| $translator | \Translator\TranslatorInterface|null | |
| $textDomain | string | (optional) |
Returns: \AbstractValidator
Indicate whether or not translation should be enabled
| Parameter Name | Type | Description |
|---|---|---|
| $flag | bool |
Returns: \AbstractValidator
Set translation text domain
| Parameter Name | Type | Description |
|---|---|---|
| $textDomain | string |
Returns: \AbstractValidator
Set flag indicating whether or not value should be obfuscated in messages
| Parameter Name | Type | Description |
|---|---|---|
| $flag | bool |
Returns: \AbstractValidator