Validator for the maximum size of a file up to a max of 2GB
Sets validator options
If $options is a integer, it will be used as maximum file size As Array is accepts the following keys: ‘min’: Minimum file size ‘max’: Maximum file size ‘useByteString’: Use bytestring or real size for messages
Parameters: | integer|array|Traversable – Options for the adapter |
---|
Should messages return bytes as integer or as string in SI notation
Parameters: | bool – Use bytestring ? |
---|---|
Return type: | integer |
Returns the minimum file size
Parameters: | bool – Whether or not to force return of the raw value (defaults off) |
---|---|
Return type: | integer|string |
Sets the minimum file size
File size can be an integer or an byte string This includes ‘B’, ‘kB’, ‘MB’, ‘GB’, ‘TB’, ‘PB’, ‘EB’, ‘ZB’, ‘YB’ For example: 2000, 2MB, 0.2GB
Parameters: | integer|string – The minimum file size |
---|---|
Return type: | Size Provides a fluent interface |
Throws : | ExceptionInvalidArgumentException When min is greater than max |
Returns the maximum file size
Parameters: | bool – Whether or not to force return of the raw value (defaults off) |
---|---|
Return type: | integer|string |
Sets the maximum file size
File size can be an integer or an byte string This includes ‘B’, ‘kB’, ‘MB’, ‘GB’, ‘TB’, ‘PB’, ‘EB’, ‘ZB’, ‘YB’ For example: 2000, 2MB, 0.2GB
Parameters: | integer|string – The maximum file size |
---|---|
Return type: | Size Provides a fluent interface |
Throws : | ExceptionInvalidArgumentException When max is smaller than min |
Returns true if and only if the file size of $value is at least min and not bigger than max (when max is not null).
Parameters: | string|array – File to check for size |
---|---|
Return type: | bool |