Exception.php 785 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * @package KO7
  4. * @category Exceptions
  5. *
  6. * @copyright (c) 2007-2016 Kohana Team
  7. * @copyright (c) since 2016 Koseven Team
  8. * @license https://koseven.dev/LICENSE
  9. */
  10. class KO7_Validation_Exception extends KO7_Exception {
  11. /**
  12. * @var object Validation instance
  13. */
  14. public $array;
  15. /**
  16. * @param Validation $array Validation object
  17. * @param string $message error message
  18. * @param array $values translation variables
  19. * @param int $code the exception code
  20. */
  21. public function __construct(Validation $array, $message = 'Failed to validate array', array $values = NULL, $code = 0, Exception $previous = NULL)
  22. {
  23. $this->array = $array;
  24. parent::__construct($message, $values, $code, $previous);
  25. }
  26. }