Ejemplo n.º 1
0
 /**
  * @param array $data
  * @param ErrorInterface $constraint
  */
 private function mergeConstraintData(array &$data, ErrorInterface $constraint)
 {
     $data['error'] = $constraint->getName();
     if ($constraint->getData()) {
         $data = array_merge($data, $constraint->getData());
     }
 }
 /**
  * @param ErrorInterface $error
  * @param string|null    $path
  */
 public function __construct(ErrorInterface $error, $path = null)
 {
     $this->error = $error;
     $this->path = $path;
     parent::__construct(sprintf('The constraint %s has been violated.', $error->getName()));
 }