Zend Framework  3.0
Public Member Functions | Protected Attributes | List of all members
InputFilter Class Reference

Public Member Functions

 setFactory (Factory $factory)
 Set factory to use when adding inputs and filters by spec.
 
 getFactory ()
 Get factory to use when adding inputs and filters by spec.
 
 add ($input, $name=null)
 Add an input to the input filter.
 
- Public Member Functions inherited from BaseInputFilter
 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 Attributes

 $factory
 
- Protected Attributes inherited from BaseInputFilter
 $data
 
 $inputs = []
 
 $invalidInputs
 
 $validationGroup
 
 $validInputs
 

Additional Inherited Members

- Public Attributes inherited from InputFilterInterface
const VALIDATE_ALL = 'INPUT_FILTER_ALL'
 
- Protected Member Functions inherited from BaseInputFilter
 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.
 

Member Function Documentation

add (   $input,
  $name = null 
)

Add an input to the input filter.

Parameters
array | Traversable | InputInterface | InputFilterInterface$input
null | string$name
Returns
InputFilter

Implements InputFilterInterface.

getFactory ( )

Get factory to use when adding inputs and filters by spec.

Lazy-loads a Factory instance if none attached.

Returns
Factory
setFactory ( Factory  $factory)

Set factory to use when adding inputs and filters by spec.

Parameters
Factory$factory
Returns
InputFilter

Member Data Documentation

$factory
protected