Class CollectionInputFilter

Summary

Fully Qualified Name: Zend\InputFilter\CollectionInputFilter
Extends: InputFilter

Description

Methods

Name Description Defined By
add() Add an input to the input filter InputFilter
clearRawValues() Clear collectionRawValues CollectionInputFilter
clearValues() Clear collectionValues CollectionInputFilter
count() Countable: number of inputs in this input filter BaseInputFilter
get() Retrieve a named input BaseInputFilter
getCount() Get the count of data to validate, use the count of data by default CollectionInputFilter
getFactory() Get factory to use when adding inputs and filters by spec InputFilter
getInputFilter() Get the input filter used when looping the data CollectionInputFilter
getInputs() Get an array of all inputs BaseInputFilter
getInvalidInput() Return a list of inputs that were invalid. BaseInputFilter
getIsRequired() Get if collection can be empty CollectionInputFilter
getMessages() {@inheritdoc} CollectionInputFilter
getNotEmptyValidator() Retrieve the NotEmpty validator to use for failed "required" validations. CollectionInputFilter
getRawValue() Retrieve a raw (unfiltered) value from a named input BaseInputFilter
getRawValues() {@inheritdoc} CollectionInputFilter
getUnfilteredData() BaseInputFilter
getUnknown() {@inheritdoc} CollectionInputFilter
getValidInput() Return a list of inputs that were valid. BaseInputFilter
getValue() Retrieve a value from a named input BaseInputFilter
getValues() {@inheritdoc} CollectionInputFilter
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() {@inheritdoc} CollectionInputFilter
merge() Merges the inputs from an InputFilter into the current one BaseInputFilter
remove() Remove a named input BaseInputFilter
replace() Replace a named input BaseInputFilter
setCount() Set the count of data to validate CollectionInputFilter
setData() {@inheritdoc} CollectionInputFilter
setFactory() Set factory to use when adding inputs and filters by spec InputFilter
setInputFilter() Set the input filter to use when looping the data CollectionInputFilter
setIsRequired() Set if the collection can be empty CollectionInputFilter
setNotEmptyValidator() Set the NotEmpty validator to use for failed "required" validations. CollectionInputFilter
setUnfilteredData() BaseInputFilter
setValidationGroup() {@inheritdoc} CollectionInputFilter

Method Details

add()

Add an input to the input filter

Parameter Name Type Description
$input array|\Traversable|\InputInterface|\InputFilterInterface
$name null|string

Returns: \InputFilter

clearRawValues()

Clear collectionRawValues

Returns: array[]

clearValues()

Clear collectionValues

Returns: array[]

count()

Countable: number of inputs in this input filter

Only details the number of direct children.

Returns: int

get()

Retrieve a named input

Parameter Name Type Description
$name string

Returns: \InputInterface|\InputFilterInterface

getCount()

Get the count of data to validate, use the count of data by default

Returns: int

getFactory()

Get factory to use when adding inputs and filters by spec

Lazy-loads a Factory instance if none attached.

Returns: \Factory

getInputFilter()

Get the input filter used when looping the data

Returns: \BaseInputFilter

getInputs()

Get an array of all inputs

Returns: \InputInterface[]|\InputFilterInterface[]

getInvalidInput()

Return a list of inputs that were invalid.

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

Returns: \InputInterface[]

getIsRequired()

Get if collection can be empty

Returns: bool

getMessages()

{@inheritdoc}

Returns:

getNotEmptyValidator()

Retrieve the NotEmpty validator to use for failed "required" validations.

This validator will be used to produce a validation failure message in cases where the collection is empty but required.

Returns: \NotEmpty

getRawValue()

Retrieve a raw (unfiltered) value from a named input

Parameter Name Type Description
$name string

Returns: mixed

getRawValues()

{@inheritdoc}

Returns:

getUnfilteredData()

Returns: array|object

getUnknown()

{@inheritdoc}

Returns:

getValidInput()

Return a list of inputs that were valid.

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

Returns: \InputInterface[]

getValue()

Retrieve a value from a named input

Parameter Name Type Description
$name string

Returns: mixed

getValues()

{@inheritdoc}

Returns:

has()

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

Parameter Name Type Description
$name string

Returns: bool

hasUnknown()

Is the data set has unknown input ?

Returns: bool

init()

This function is automatically called when creating element with factory. It allows to perform various operations (add elements.

..)

Returns: void

isValid()

{@inheritdoc}

Parameter Name Type Description
$context mixed Ignored,

Returns:

merge()

Merges the inputs from an InputFilter into the current one

Parameter Name Type Description
$inputFilter \BaseInputFilter

Returns: self

remove()

Remove a named input

Parameter Name Type Description
$name string

Returns: \InputFilterInterface

replace()

Replace a named input

Parameter Name Type Description
$input mixed Any
$name string Name

Returns: self

setCount()

Set the count of data to validate

Parameter Name Type Description
$count int

Returns: \CollectionInputFilter

setData()

{@inheritdoc}

Parameter Name Type Description
$data

Returns:

setFactory()

Set factory to use when adding inputs and filters by spec

Parameter Name Type Description
$factory \Factory

Returns: \InputFilter

setInputFilter()

Set the input filter to use when looping the data

Parameter Name Type Description
$inputFilter \BaseInputFilter|array|\Traversable

Returns: \CollectionInputFilter

setIsRequired()

Set if the collection can be empty

Parameter Name Type Description
$isRequired bool

Returns: \CollectionInputFilter

setNotEmptyValidator()

Set the NotEmpty validator to use for failed "required" validations.

This validator will be used to produce a validation failure message in cases where the collection is empty but required.

Parameter Name Type Description
$notEmptyValidator \NotEmpty

Returns: $this

setUnfilteredData()

Parameter Name Type Description
$data array|object

Returns: $this

setValidationGroup()

{@inheritdoc}

Parameter Name Type Description
$name

Returns:

Top