interface ConstraintViolationListInterface implements Traversable, Countable, ArrayAccess

A list of constraint violations.

Methods

add(ConstraintViolationInterface $violation)

Adds a constraint violation to this list.

addAll(ConstraintViolationListInterface $otherList)

Merges an existing violation list into this list.

get(int $offset)

Returns the violation at a given offset.

bool
has(int $offset)

Returns whether the given offset exists.

set(int $offset, ConstraintViolationInterface $violation)

Sets a violation at a given offset.

remove(int $offset)

Removes a violation at a given offset.

Details

at line line 24
add(ConstraintViolationInterface $violation)

Adds a constraint violation to this list.

Parameters

ConstraintViolationInterface $violation

at line line 29
addAll(ConstraintViolationListInterface $otherList)

Merges an existing violation list into this list.

Parameters

ConstraintViolationListInterface $otherList

at line line 40
ConstraintViolationInterface get(int $offset)

Returns the violation at a given offset.

Parameters

int $offset The offset of the violation

Return Value

ConstraintViolationInterface The violation

Exceptions

OutOfBoundsException if the offset does not exist

at line line 49
bool has(int $offset)

Returns whether the given offset exists.

Parameters

int $offset The violation offset

Return Value

bool Whether the offset exists

at line line 57
set(int $offset, ConstraintViolationInterface $violation)

Sets a violation at a given offset.

Parameters

int $offset The violation offset
ConstraintViolationInterface $violation The violation

at line line 64
remove(int $offset)

Removes a violation at a given offset.

Parameters

int $offset The offset to remove