comparison vendor/symfony/validator/ConstraintViolationListInterface.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children a9cd425dd02b
comparison
equal deleted inserted replaced
-1:000000000000 0:c75dbcec494b
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\Validator;
13
14 /**
15 * A list of constraint violations.
16 *
17 * @author Bernhard Schussek <bschussek@gmail.com>
18 */
19 interface ConstraintViolationListInterface extends \Traversable, \Countable, \ArrayAccess
20 {
21 /**
22 * Adds a constraint violation to this list.
23 */
24 public function add(ConstraintViolationInterface $violation);
25
26 /**
27 * Merges an existing violation list into this list.
28 */
29 public function addAll(ConstraintViolationListInterface $otherList);
30
31 /**
32 * Returns the violation at a given offset.
33 *
34 * @param int $offset The offset of the violation
35 *
36 * @return ConstraintViolationInterface The violation
37 *
38 * @throws \OutOfBoundsException if the offset does not exist
39 */
40 public function get($offset);
41
42 /**
43 * Returns whether the given offset exists.
44 *
45 * @param int $offset The violation offset
46 *
47 * @return bool Whether the offset exists
48 */
49 public function has($offset);
50
51 /**
52 * Sets a violation at a given offset.
53 *
54 * @param int $offset The violation offset
55 * @param ConstraintViolationInterface $violation The violation
56 */
57 public function set($offset, ConstraintViolationInterface $violation);
58
59 /**
60 * Removes a violation at a given offset.
61 *
62 * @param int $offset The offset to remove
63 */
64 public function remove($offset);
65 }