You are here

public function ConstraintViolationList::offsetSet in Plug 7

File

lib/Symfony/validator/Symfony/Component/Validator/ConstraintViolationList.php, line 143

Class

ConstraintViolationList
Default implementation of {@ConstraintViolationListInterface}.

Namespace

Symfony\Component\Validator

Code

public function offsetSet($offset, $violation) {
  if (null === $offset) {
    $this
      ->add($violation);
  }
  else {
    $this
      ->set($offset, $violation);
  }
}