Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\Validator; Chris@0: Chris@0: /** Chris@0: * A list of constraint violations. Chris@0: * Chris@0: * @author Bernhard Schussek Chris@0: */ Chris@0: interface ConstraintViolationListInterface extends \Traversable, \Countable, \ArrayAccess Chris@0: { Chris@0: /** Chris@0: * Adds a constraint violation to this list. Chris@0: */ Chris@0: public function add(ConstraintViolationInterface $violation); Chris@0: Chris@0: /** Chris@0: * Merges an existing violation list into this list. Chris@0: */ Chris@17: public function addAll(self $otherList); Chris@0: Chris@0: /** Chris@0: * Returns the violation at a given offset. Chris@0: * Chris@0: * @param int $offset The offset of the violation Chris@0: * Chris@0: * @return ConstraintViolationInterface The violation Chris@0: * Chris@14: * @throws \OutOfBoundsException if the offset does not exist Chris@0: */ Chris@0: public function get($offset); Chris@0: Chris@0: /** Chris@0: * Returns whether the given offset exists. Chris@0: * Chris@0: * @param int $offset The violation offset Chris@0: * Chris@0: * @return bool Whether the offset exists Chris@0: */ Chris@0: public function has($offset); Chris@0: Chris@0: /** Chris@0: * Sets a violation at a given offset. Chris@0: * Chris@0: * @param int $offset The violation offset Chris@0: * @param ConstraintViolationInterface $violation The violation Chris@0: */ Chris@0: public function set($offset, ConstraintViolationInterface $violation); Chris@0: Chris@0: /** Chris@0: * Removes a violation at a given offset. Chris@0: * Chris@0: * @param int $offset The offset to remove Chris@0: */ Chris@0: public function remove($offset); Chris@0: }