You are here

interface ConstraintViolationListInterface in Plug 7

A list of constraint violations.

@author Bernhard Schussek <bschussek@gmail.com>

@api

Hierarchy

  • interface \Symfony\Component\Validator\ConstraintViolationListInterface extends \Symfony\Component\Validator\Traversable \Symfony\Component\Validator\Countable \Symfony\Component\Validator\ArrayAccess

Expanded class hierarchy of ConstraintViolationListInterface

All classes that implement ConstraintViolationListInterface

2 files declare their use of ConstraintViolationListInterface
ContextualValidatorInterface.php in lib/Symfony/validator/Symfony/Component/Validator/Validator/ContextualValidatorInterface.php
ValidatorInterface.php in lib/Symfony/validator/Symfony/Component/Validator/Validator/ValidatorInterface.php

File

lib/Symfony/validator/Symfony/Component/Validator/ConstraintViolationListInterface.php, line 21

Namespace

Symfony\Component\Validator
View source
interface ConstraintViolationListInterface extends \Traversable, \Countable, \ArrayAccess {

  /**
   * Adds a constraint violation to this list.
   *
   * @param ConstraintViolationInterface $violation The violation to add.
   *
   * @api
   */
  public function add(ConstraintViolationInterface $violation);

  /**
   * Merges an existing violation list into this list.
   *
   * @param ConstraintViolationListInterface $otherList The list to merge.
   *
   * @api
   */
  public function addAll(ConstraintViolationListInterface $otherList);

  /**
   * Returns the violation at a given offset.
   *
   * @param int $offset The offset of the violation.
   *
   * @return ConstraintViolationInterface The violation.
   *
   * @throws \OutOfBoundsException If the offset does not exist.
   *
   * @api
   */
  public function get($offset);

  /**
   * Returns whether the given offset exists.
   *
   * @param int $offset The violation offset.
   *
   * @return bool Whether the offset exists.
   *
   * @api
   */
  public function has($offset);

  /**
   * Sets a violation at a given offset.
   *
   * @param int                          $offset    The violation offset.
   * @param ConstraintViolationInterface $violation The violation.
   *
   * @api
   */
  public function set($offset, ConstraintViolationInterface $violation);

  /**
   * Removes a violation at a given offset.
   *
   * @param int $offset The offset to remove.
   *
   * @api
   */
  public function remove($offset);

}

Members

Namesort descending Modifiers Type Description Overrides
ConstraintViolationListInterface::add public function Adds a constraint violation to this list. 1
ConstraintViolationListInterface::addAll public function Merges an existing violation list into this list. 1
ConstraintViolationListInterface::get public function Returns the violation at a given offset. 1
ConstraintViolationListInterface::has public function Returns whether the given offset exists. 1
ConstraintViolationListInterface::remove public function Removes a violation at a given offset. 1
ConstraintViolationListInterface::set public function Sets a violation at a given offset. 1