MultipleErrors.php 498 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Egulias\EmailValidator\Validation;
  3. use Egulias\EmailValidator\Exception\InvalidEmail;
  4. class MultipleErrors extends InvalidEmail
  5. {
  6. const CODE = 999;
  7. const REASON = "Accumulated errors for multiple validations";
  8. /**
  9. * @var array
  10. */
  11. private $errors = [];
  12. public function __construct(array $errors)
  13. {
  14. $this->errors = $errors;
  15. parent::__construct();
  16. }
  17. public function getErrors()
  18. {
  19. return $this->errors;
  20. }
  21. }