blob: 59abdf2f0f54a3bf65b5c82953e16af350ae7052 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?php
namespace Cardinity\Exception;
use Symfony\Component\Validator\ConstraintViolationListInterface;
class InvalidAttributeValue extends Runtime
{
/** @type ConstraintViolationListInterface */
private $violations;
public function __construct($message, ConstraintViolationListInterface $violations)
{
$message .= ' Violations: ' . $violations->__toString();
parent::__construct($message);
$this->violations = $violations;
}
public function getViolations()
{
return $this->violations;
}
}
|