Initial commit: CloudOps infrastructure platform
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Mautic\FormBundle\Exception;
|
||||
|
||||
class FieldNotFoundException extends \Exception
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Mautic\FormBundle\Exception;
|
||||
|
||||
class FileValidationException extends \Exception
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Mautic\FormBundle\Exception;
|
||||
|
||||
class NoFileGivenException extends \Exception
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Mautic\FormBundle\Exception;
|
||||
|
||||
class ValidationException extends \Exception
|
||||
{
|
||||
/**
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $violations = [];
|
||||
|
||||
public function __construct($message = 'Validation failed', $code = 0, ?\Exception $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getViolations(): array
|
||||
{
|
||||
return $this->violations;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed[] $violations
|
||||
*/
|
||||
public function setViolations(array $violations): self
|
||||
{
|
||||
$this->violations = $violations;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user