Public Member Functions |
| __construct ($options) |
| getMin () |
| setMin ($min) |
| getMax () |
| setMax ($max) |
| addFile ($file) |
| isValid ($value, $file=null) |
Data Fields |
const | TOO_MUCH = 'fileCountTooMuch' |
const | TOO_LESS = 'fileCountTooLess' |
Protected Member Functions |
| _throw ($file, $errorType) |
Protected Attributes |
| $_messageTemplates |
| $_messageVariables |
| $_min |
| $_max |
| $_count |
| $_files |
Detailed Description
Definition at line 35 of file Count.php.
Constructor & Destructor Documentation
__construct |
( |
$ |
options ) |
|
Sets validator options
Min limits the file count, when used with max=null it is the maximum file count It also accepts an array with the keys 'min' and 'max'
If $options is a integer, it will be used as maximum file count As Array is accepts the following keys: 'min': Minimum filecount 'max': Maximum filecount
- Parameters:
-
integer | array | Zend_Config | $options | Options for the adapter |
- Returns:
- void
Definition at line 106 of file Count.php.
Member Function Documentation
_throw |
( |
$ |
file, |
|
|
$ |
errorType |
|
) |
| [protected] |
Adds a file for validation
- Parameters:
-
Definition at line 216 of file Count.php.
Returns the maximum file count
- Returns:
- integer
Definition at line 177 of file Count.php.
Returns the minimum file count
- Returns:
- integer
Definition at line 138 of file Count.php.
isValid |
( |
$ |
value, |
|
|
$ |
file = null |
|
) |
| |
Defined by Zend_Validate_Interface
Returns true if and only if the file count of all checked files is at least min and not bigger than max (when max is not null). Attention: When checking with set min you must give all files with the first call, otherwise you will get an false.
- Parameters:
-
string | array | $value | Filenames to check for count |
array | $file | File data from Zend_File_Transfer |
- Returns:
- boolean
Reimplemented in Zend_Validate_File_WordCount.
Definition at line 244 of file Count.php.
Sets the maximum file count
- Parameters:
-
integer | array | $max | The maximum file count |
- Returns:
- Zend_Validate_StringLength Provides a fluent interface
- Exceptions:
-
Definition at line 189 of file Count.php.
Sets the minimum file count
- Parameters:
-
integer | array | $min | The minimum file count |
- Returns:
- Zend_Validate_File_Count Provides a fluent interface
- Exceptions:
-
Definition at line 150 of file Count.php.
Field Documentation
$_messageTemplates [protected] |
Initial value: array(
self::TOO_MUCH => "Too much files, maximum '%max%' are allowed but '%count%' are given",
self::TOO_LESS => "Too less files, minimum '%min%' are expected but '%count%' are given"
)
Reimplemented from Zend_Validate_Abstract.
Definition at line 47 of file Count.php.
$_messageVariables [protected] |
The documentation for this class was generated from the following file:
- E:/E/GEAMP/www/openbiz/openbiz/others/Zend/Validate/File/Count.php