Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php defined('SYSPATH') or die('No direct script access.');
- /**
- * ORM Validation exceptions with locale based error messages
- *
- * @package URP
- * @author Rex
- * @copyright (c) 2011 Eksu
- */
- class ORM_Validation_Exception extends Kohana_ORM_Validation_Exception
- {
- /**
- * Constructs a new exception for the specified model. Use locale based aliases
- *
- * @param string $alias The alias to use when looking for error messages
- * @param Validation $object The Validation object of the model
- * @param string $message The error message
- * @param array $values The array of values for the error message
- * @param integer $code The error code for the exception
- * @return void
- */
- public function __construct($alias, Validation $object, $message = 'Failed to validate array', array $values = NULL, $code = 0)
- {
- parent::__construct($alias, $object, $message, $values, $code);
- //Имя с учетом локали ;-)
- $this->_alias = $alias . '-' . $this->lang;
- }
- } // End ORM_Validation_Exception
Add Comment
Please, Sign In to add comment