Validator for counting all given files
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|Traversable – Options for the adapter |
---|
Sets the minimum file count
Parameters: | integer|array – The minimum file count |
---|---|
Return type: | Count Provides a fluent interface |
Throws : | ExceptionInvalidArgumentException When min is greater than max |
Sets the maximum file count
Parameters: | integer|array – The maximum file count |
---|---|
Return type: | Count Provides a fluent interface |
Throws : | ExceptionInvalidArgumentException When max is smaller than min |
Adds a file for validation
Parameters: | string|array – |
---|---|
Return type: | Count |
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: |
|
---|---|
Return type: | bool |