ConstraintViolationList
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.
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.
remove(int $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}
findByCodes(string|string[] $codes)
Creates iterator for errors with specific codes.
Details
addAll(ConstraintViolationListInterface $otherList)
Merges an existing violation list into this list.
ConstraintViolationList
findByCodes(string|string[] $codes)
Creates iterator for errors with specific codes.