class ConstraintViolationList implements IteratorAggregate, ConstraintViolationListInterface

Default implementation of {@ConstraintViolationListInterface}.

Methods

__construct(array $violations = array())

Creates a new constraint violation list.

string
__toString()

Converts the violation into a string for debugging purposes.

add(ConstraintViolationInterface $violation)

Adds a constraint violation to this list.

addAll(ConstraintViolationListInterface $otherList)

Merges an existing violation list into this list.

get(integer $offset)

Returns the violation at a given offset.

Boolean
has(integer $offset)

Returns whether the given offset exists.

set(integer $offset, ConstraintViolationInterface $violation)

Sets a violation at a given offset.

remove(integer $offset)

Removes a violation at a given offset.

getIterator()

{@inheritDoc}

count()

{@inheritDoc}

offsetExists($offset)

{@inheritDoc}

offsetGet($offset)

{@inheritDoc}

offsetSet($offset, $violation)

{@inheritDoc}

offsetUnset($offset)

{@inheritDoc}

Details

at line line 31
__construct(array $violations = array())

Creates a new constraint violation list.

Parameters

array $violations The constraint violations to add to the list

at line line 43
string __toString()

Converts the violation into a string for debugging purposes.

Return Value

string The violation as string.

at line line 57
add(ConstraintViolationInterface $violation)

Adds a constraint violation to this list.

Parameters

ConstraintViolationInterface $violation The violation to add.

at line line 65
addAll(ConstraintViolationListInterface $otherList)

Merges an existing violation list into this list.

Parameters

ConstraintViolationListInterface $otherList The list to merge.

at line line 75
ConstraintViolationInterface get(integer $offset)

Returns the violation at a given offset.

Parameters

integer $offset The offset of the violation.

Return Value

ConstraintViolationInterface The violation.

Exceptions

OutOfBoundsException If the offset does not exist.

at line line 87
Boolean has(integer $offset)

Returns whether the given offset exists.

Parameters

integer $offset The violation offset.

Return Value

Boolean Whether the offset exists.

at line line 95
set(integer $offset, ConstraintViolationInterface $violation)

Sets a violation at a given offset.

Parameters

integer $offset The violation offset.
ConstraintViolationInterface $violation The violation.

at line line 103
remove(integer $offset)

Removes a violation at a given offset.

Parameters

integer $offset The offset to remove.

at line line 111
getIterator()

{@inheritDoc}

at line line 119
count()

{@inheritDoc}

at line line 127
offsetExists($offset)

{@inheritDoc}

Parameters

$offset

at line line 135
offsetGet($offset)

{@inheritDoc}

Parameters

$offset

at line line 143
offsetSet($offset, $violation)

{@inheritDoc}

Parameters

$offset
$violation

at line line 155
offsetUnset($offset)

{@inheritDoc}

Parameters

$offset