Zend Framework
3.0
|
Public Member Functions | |
init () | |
This function is automatically called when creating element with factory. | |
count () | |
Countable: number of inputs in this input filter. | |
add ($input, $name=null) | |
Add an input to the input filter. | |
replace ($input, $name) | |
Replace a named input. | |
get ($name) | |
Retrieve a named input. | |
has ($name) | |
Test if an input or input filter by the given name is attached. | |
remove ($name) | |
Remove a named input. | |
setData ($data) | |
Set data to use when validating and filtering. | |
isValid ($context=null) | |
Is the data set valid? | |
setValidationGroup ($name) | |
Provide a list of one or more elements indicating the complete set to validate. | |
getInvalidInput () | |
Return a list of inputs that were invalid. | |
getValidInput () | |
Return a list of inputs that were valid. | |
getValue ($name) | |
Retrieve a value from a named input. | |
getValues () | |
Return a list of filtered values. | |
getRawValue ($name) | |
Retrieve a raw (unfiltered) value from a named input. | |
getRawValues () | |
Return a list of unfiltered values. | |
getMessages () | |
Return a list of validation failure messages. | |
hasUnknown () | |
Is the data set has unknown input ? | |
getUnknown () | |
Return the unknown input. | |
getInputs () | |
Get an array of all inputs. | |
merge (BaseInputFilter $inputFilter) | |
Merges the inputs from an InputFilter into the current one. | |
Public Member Functions inherited from InputFilterInterface | |
isValid () | |
Is the data set valid? | |
Protected Member Functions | |
validateInputs (array $inputs, $data=[], $context=null) | |
Validate a set of inputs against the current data. | |
validateValidationGroup (array $inputs) | |
Ensure all names of a validation group exist as input in the filter. | |
populate () | |
Populate the values of all attached inputs. | |
Protected Attributes | |
$data | |
$inputs = [] | |
$invalidInputs | |
$validationGroup | |
$validInputs | |
Additional Inherited Members | |
Public Attributes inherited from InputFilterInterface | |
const | VALIDATE_ALL = 'INPUT_FILTER_ALL' |
add | ( | $input, | |
$name = null |
|||
) |
Add an input to the input filter.
InputInterface | InputFilterInterface | $input | |
null | string | $name | Name used to retrieve this input |
Exception\InvalidArgumentException |
Implements InputFilterInterface.
count | ( | ) |
Countable: number of inputs in this input filter.
Only details the number of direct children.
get | ( | $name | ) |
Retrieve a named input.
string | $name |
Exception\InvalidArgumentException |
Implements InputFilterInterface.
getInputs | ( | ) |
Get an array of all inputs.
getInvalidInput | ( | ) |
Return a list of inputs that were invalid.
Implementations should return an associative array of name/input pairs that failed validation.
Implements InputFilterInterface.
getMessages | ( | ) |
Return a list of validation failure messages.
Should return an associative array of named input/message list pairs. Pairs should only be returned for inputs that failed validation.
Implements InputFilterInterface.
getRawValue | ( | $name | ) |
Retrieve a raw (unfiltered) value from a named input.
string | $name |
Exception\InvalidArgumentException |
Implements InputFilterInterface.
getRawValues | ( | ) |
Return a list of unfiltered values.
List should be an associative array of named input/value pairs, with the values unfiltered.
Implements InputFilterInterface.
getUnknown | ( | ) |
Return the unknown input.
Exception\RuntimeException |
Implements UnknownInputsCapableInterface.
getValidInput | ( | ) |
Return a list of inputs that were valid.
Implementations should return an associative array of name/input pairs that passed validation.
Implements InputFilterInterface.
getValue | ( | $name | ) |
Retrieve a value from a named input.
string | $name |
Exception\InvalidArgumentException |
Implements InputFilterInterface.
getValues | ( | ) |
Return a list of filtered values.
List should be an associative array, with the values filtered. If validation failed, this should raise an exception.
Implements InputFilterInterface.
has | ( | $name | ) |
Test if an input or input filter by the given name is attached.
string | $name |
Implements InputFilterInterface.
hasUnknown | ( | ) |
Is the data set has unknown input ?
Exception\RuntimeException |
Implements UnknownInputsCapableInterface.
init | ( | ) |
This function is automatically called when creating element with factory.
It allows to perform various operations (add elements...)
Implements InitializableInterface.
isValid | ( | $context = null | ) |
Is the data set valid?
mixed | null | $context |
Exception\RuntimeException |
merge | ( | BaseInputFilter | $inputFilter | ) |
Merges the inputs from an InputFilter into the current one.
BaseInputFilter | $inputFilter |
|
protected |
Populate the values of all attached inputs.
remove | ( | $name | ) |
Remove a named input.
string | $name |
Implements InputFilterInterface.
replace | ( | $input, | |
$name | |||
) |
Replace a named input.
mixed | $input | Any of the input types allowed on add() method. |
string | $name | Name of the input to replace |
Exception\InvalidArgumentException | If input to replace not exists. |
Implements ReplaceableInputInterface.
setData | ( | $data | ) |
Set data to use when validating and filtering.
array | Traversable | $data |
Exception\InvalidArgumentException |
Implements InputFilterInterface.
setValidationGroup | ( | $name | ) |
Provide a list of one or more elements indicating the complete set to validate.
When provided, calls to isValid() will only validate the provided set.
If the initial value is VALIDATE_ALL, the current validation group, if any, should be cleared.
Implementations should allow passing a single array value, or multiple arguments, each specifying a single input.
mixed | $name |
Exception\InvalidArgumentException |
Implements InputFilterInterface.
|
protected |
Validate a set of inputs against the current data.
string[] | $inputs Array of input names. | |
array | ArrayAccess | $data | |
mixed | null | $context |
|
protected |
Ensure all names of a validation group exist as input in the filter.
string[] | $inputs Input names |
Exception\InvalidArgumentException |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |