Detailed Description
Definition at line 35 of file Size.php.
Constructor & Destructor Documentation
__construct |
( |
$ |
options ) |
|
Sets validator options
If $options is a integer, it will be used as maximum filesize As Array is accepts the following keys: 'min': Minimum filesize 'max': Maximum filesize 'bytestring': Use bytestring or real size for messages
- Parameters:
-
integer | array | $options | Options for the adapter |
Reimplemented in Zend_Validate_File_FilesSize.
Definition at line 103 of file Size.php.
Member Function Documentation
_fromByteString |
( |
$ |
size ) |
[protected] |
Returns the unformatted size
- Parameters:
-
- Returns:
- integer
Definition at line 344 of file Size.php.
Retrieve current detected file size
- Returns:
- int
Definition at line 249 of file Size.php.
_setSize |
( |
$ |
size ) |
[protected] |
_throw |
( |
$ |
file, |
|
|
$ |
errorType |
|
) |
| [protected] |
Throws an error of the given type
- Parameters:
-
string | $file | |
string | $errorType | |
- Returns:
- false
Definition at line 396 of file Size.php.
_toByteString |
( |
$ |
size ) |
[protected] |
Returns the formatted size
- Parameters:
-
- Returns:
- string
Definition at line 328 of file Size.php.
Returns the maximum filesize
- Parameters:
-
bool | $raw | Whether or not to force return of the raw value (defaults off) |
- Returns:
- integer|string
Definition at line 208 of file Size.php.
Returns the minimum filesize
- Parameters:
-
bool | $raw | Whether or not to force return of the raw value (defaults off) |
- Returns:
- integer|string
Definition at line 166 of file Size.php.
isValid |
( |
$ |
value, |
|
|
$ |
file = null |
|
) |
| |
Defined by Zend_Validate_Interface
Returns true if and only if the filesize of $value is at least min and not bigger than max (when max is not null).
- Parameters:
-
string | $value | Real file to check for size |
array | $file | File data from Zend_File_Transfer |
- Returns:
- boolean
Reimplemented in Zend_Validate_File_FilesSize.
Definition at line 276 of file Size.php.
Sets the maximum filesize
- Parameters:
-
integer | $max | The maximum filesize |
- Exceptions:
-
- Returns:
- Zend_Validate_StringLength Provides a fluent interface
Definition at line 225 of file Size.php.
Sets the minimum filesize
- Parameters:
-
integer | $min | The minimum filesize |
- Exceptions:
-
- Returns:
- Zend_Validate_File_Size Provides a fluent interface
Definition at line 183 of file Size.php.
setUseByteString |
( |
$ |
byteString = true ) |
|
Returns the minimum filesize
- Parameters:
-
boolean | $byteString | Use bytestring ? |
- Returns:
- integer
Definition at line 144 of file Size.php.
Will bytestring be used?
- Returns:
- boolean
Definition at line 155 of file Size.php.
Field Documentation
$_messageTemplates [protected] |
Initial value: array(
self::TOO_BIG => "Maximum allowed size for file '%value%' is '%max%' but '%size%' detected",
self::TOO_SMALL => "Minimum expected size for file '%value%' is '%min%' but '%size%' detected",
self::NOT_FOUND => "The file '%value%' could not be found"
)
Reimplemented from Zend_Validate_Abstract.
Definition at line 48 of file Size.php.
$_messageVariables [protected] |
The documentation for this class was generated from the following file:
- E:/E/GEAMP/www/openbiz/openbiz/others/Zend/Validate/File/Size.php