class ConstraintViolationList implements IteratorAggregate, ConstraintViolationListInterface
Default implementation of {@ConstraintViolationListInterface}.
| __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. | ||
| ConstraintViolationInterface | 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. | ||
| ArrayIterator|ConstraintViolationInterface[] | getIterator() {@inheritdoc} | |
| count() {@inheritdoc} | ||
| offsetExists($offset) {@inheritdoc} | ||
| offsetGet($offset) {@inheritdoc} | ||
| offsetSet($offset, $violation) {@inheritdoc} | ||
| offsetUnset($offset) {@inheritdoc} | ||
| ConstraintViolationList | findByCodes(string|string[] $codes) Creates iterator for errors with specific codes. |
Creates a new constraint violation list.
| array | $violations | The constraint violations to add to the list |
Converts the violation into a string for debugging purposes.
| string | The violation as string |
Adds a constraint violation to this list.
| ConstraintViolationInterface | $violation |
Merges an existing violation list into this list.
| ConstraintViolationListInterface | $otherList |
Returns the violation at a given offset.
| int | $offset | The offset of the violation |
| ConstraintViolationInterface | The violation |
| OutOfBoundsException | if the offset does not exist |
Returns whether the given offset exists.
| int | $offset | The violation offset |
| bool | Whether the offset exists |
Sets a violation at a given offset.
| int | $offset | The violation offset |
| ConstraintViolationInterface | $violation | The violation |
Removes a violation at a given offset.
| int | $offset | The offset to remove |
{@inheritdoc}
| ArrayIterator|ConstraintViolationInterface[] |
{@inheritdoc}
{@inheritdoc}
| $offset |
{@inheritdoc}
| $offset |
{@inheritdoc}
| $offset | ||
| $violation |
{@inheritdoc}
| $offset |
Creates iterator for errors with specific codes.
| string|string[] | $codes | The codes to find |
| ConstraintViolationList | new instance which contains only specific errors |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Validator/ConstraintViolationList.html