| 1 | <?php |
||
| 8 | class ValidationException extends \Exception implements ClientAware |
||
| 9 | { |
||
| 10 | const DEFAULT_MESSAGE = 'The input object you try to submit is invalid'; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var ConstraintViolationListInterface |
||
| 14 | */ |
||
| 15 | private $violations; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param ConstraintViolationListInterface $violations |
||
| 19 | * @param string $message |
||
| 20 | * @param int $code |
||
| 21 | * @param \Throwable|null $previous |
||
| 22 | */ |
||
| 23 | public function __construct(ConstraintViolationListInterface $violations, $message = self::DEFAULT_MESSAGE, $code = 0, \Throwable $previous = null) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @return string |
||
| 32 | */ |
||
| 33 | public function getCategory() |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return bool |
||
| 40 | */ |
||
| 41 | public function isClientSafe() :bool |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return ConstraintViolationListInterface |
||
| 48 | */ |
||
| 49 | public function getViolations() :ConstraintViolationListInterface |
||
| 53 | } |
||
| 54 |