1034. Class

1034.1. Zend\InputFilter\BaseInputFilter

@todo How should we deal with required input when data is missing?
should a message be returned? if so, what message?

1034.1.1. Methods

1034.1.1.1. count

count()

Countable: number of inputs in this input filter

Only details the number of direct children.

Return type:int

1034.1.1.2. add

add()

Add an input to the input filter

Parameters:
  • InputInterface|InputFilterInterface
  • null|string – Name used to retrieve this input
Throws ExceptionInvalidArgumentException:
 
Return type:

InputFilterInterface

1034.1.1.3. get

get()

Retrieve a named input

Parameters:string
Throws ExceptionInvalidArgumentException:
 
Return type:InputInterface|InputFilterInterface

1034.1.1.4. has

has()

Test if an input or input filter by the given name is attached

Parameters:string
Return type:bool

1034.1.1.5. remove

remove()

Remove a named input

Parameters:string
Return type:InputFilterInterface

1034.1.1.6. setData

setData()

Set data to use when validating and filtering

Parameters:array|Traversable
Throws ExceptionInvalidArgumentException:
 
Return type:InputFilterInterface

1034.1.1.7. isValid

isValid()

Is the data set valid?

Return type:bool

1034.1.1.8. setValidationGroup

setValidationGroup()

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.

Parameters:mixed
Return type:InputFilterInterface

1034.1.1.9. getInvalidInput

getInvalidInput()

Return a list of inputs that were invalid.

Implementations should return an associative array of name/input pairs that failed validation.

Return type:InputInterface[]

1034.1.1.10. getValidInput

getValidInput()

Return a list of inputs that were valid.

Implementations should return an associative array of name/input pairs that passed validation.

Return type:InputInterface[]

1034.1.1.11. getValue

getValue()

Retrieve a value from a named input

Parameters:string
Throws ExceptionInvalidArgumentException:
 
Return type:mixed

1034.1.1.12. getValues

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.

Return type:array

1034.1.1.13. getRawValue

getRawValue()

Retrieve a raw (unfiltered) value from a named input

Parameters:string
Throws ExceptionInvalidArgumentException:
 
Return type:mixed

1034.1.1.14. getRawValues

getRawValues()

Return a list of unfiltered values

List should be an associative array of named input/value pairs, with the values unfiltered.

Return type:array

1034.1.1.15. getMessages

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.

Return type:array

1034.1.1.16. validateValidationGroup

validateValidationGroup()

Ensure all names of a validation group exist as input in the filter

Parameters:array
Return type:void
Throws :ExceptionInvalidArgumentException

1034.1.1.17. populate

populate()

Populate the values of all attached inputs

Return type:void

1034.1.1.18. hasUnknown

hasUnknown()

Is the data set has unknown input ?

Return type:bool

1034.1.1.19. getUnknown

getUnknown()

Return the unknown input

Return type:array