Fully Qualified Name: | Laminas\InputFilter\BaseInputFilter |
Implements: | InputFilterInterface, UnknownInputsCapableInterface, InitializableInterface, ReplaceableInputInterface, UnfilteredDataInterface |
Name | Description | Defined By |
---|---|---|
add() | Add an input to the input filter | BaseInputFilter |
count() | Countable: number of inputs in this input filter | BaseInputFilter |
get() | Retrieve a named input | BaseInputFilter |
getInputs() | Get an array of all inputs | BaseInputFilter |
getInvalidInput() | Return a list of inputs that were invalid. | BaseInputFilter |
getMessages() | Return a list of validation failure messages | BaseInputFilter |
getRawValue() | Retrieve a raw (unfiltered) value from a named input | BaseInputFilter |
getRawValues() | Return a list of unfiltered values | BaseInputFilter |
getUnfilteredData() | BaseInputFilter | |
getUnknown() | Return the unknown input | BaseInputFilter |
getValidInput() | Return a list of inputs that were valid. | BaseInputFilter |
getValue() | Retrieve a value from a named input | BaseInputFilter |
getValues() | Return a list of filtered values | BaseInputFilter |
has() | Test if an input or input filter by the given name is attached | BaseInputFilter |
hasUnknown() | Is the data set has unknown input ? | BaseInputFilter |
init() | This function is automatically called when creating element with factory. It allows to perform various operations (add elements. | BaseInputFilter |
isValid() | Is the data set valid? | BaseInputFilter |
merge() | Merges the inputs from an InputFilter into the current one | BaseInputFilter |
remove() | Remove a named input | BaseInputFilter |
replace() | Replace a named input | BaseInputFilter |
setData() | Set data to use when validating and filtering | BaseInputFilter |
setUnfilteredData() | BaseInputFilter | |
setValidationGroup() | Provide a list of one or more elements indicating the complete set to validate | BaseInputFilter |
Add an input to the input filter
Parameter Name | Type | Description |
---|---|---|
$input | \InputInterface|\InputFilterInterface | |
$name | null|string | Name |
Returns: \InputFilterInterface
Countable: number of inputs in this input filter
Only details the number of direct children.
Returns: int
Retrieve a named input
Parameter Name | Type | Description |
---|---|---|
$name | string |
Returns: \InputInterface|\InputFilterInterface
Get an array of all inputs
Returns: \InputInterface[]|\InputFilterInterface[]
Return a list of inputs that were invalid.
Implementations should return an associative array of name/input pairs that failed validation.
Returns: \InputInterface[]
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.
Returns: array
Retrieve a raw (unfiltered) value from a named input
Parameter Name | Type | Description |
---|---|---|
$name | string |
Returns: mixed
Return a list of unfiltered values
List should be an associative array of named input/value pairs, with the values unfiltered.
Returns: array
Returns: array|object
Return the unknown input
Returns: array
Return a list of inputs that were valid.
Implementations should return an associative array of name/input pairs that passed validation.
Returns: \InputInterface[]
Retrieve a value from a named input
Parameter Name | Type | Description |
---|---|---|
$name | string |
Returns: mixed
Return a list of filtered values
List should be an associative array, with the values filtered. If validation failed, this should raise an exception.
Returns: array
Test if an input or input filter by the given name is attached
Parameter Name | Type | Description |
---|---|---|
$name | string |
Returns: bool
Is the data set has unknown input ?
Returns: bool
This function is automatically called when creating element with factory. It allows to perform various operations (add elements.
..)
Returns: void
Is the data set valid?
Parameter Name | Type | Description |
---|---|---|
$context | mixed|null |
Returns: bool
Merges the inputs from an InputFilter into the current one
Parameter Name | Type | Description |
---|---|---|
$inputFilter | \BaseInputFilter |
Returns: self
Remove a named input
Parameter Name | Type | Description |
---|---|---|
$name | string |
Returns: \InputFilterInterface
Replace a named input
Parameter Name | Type | Description |
---|---|---|
$input | mixed | Any |
$name | string | Name |
Returns: self
Set data to use when validating and filtering
Parameter Name | Type | Description |
---|---|---|
$data | null|array|\Traversable | null |
Returns: \InputFilterInterface
Parameter Name | Type | Description |
---|---|---|
$data | array|object |
Returns: $this
Provide a list of one or more elements indicating the complete set to validate
When provided, calls to {@link isValid()} will only validate the provided set.
If the initial value is {@link 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.
Parameter Name | Type | Description |
---|---|---|
$name | mixed |
Returns: \InputFilterInterface