From 3709fb2a74314057d8f01762ac19abea9fc72273 Mon Sep 17 00:00:00 2001 From: Alexander Demidov Date: Wed, 4 Jun 2014 21:57:19 +0400 Subject: [PATCH] Correct namespace in Valdiators. Add namespace Mail. --- Mail/Mailer.php | 2 +- Validator/EqualValidator.php | 2 +- Validator/MbStrlenValidator.php | 4 ++-- Validator/NotEmptyValidator.php | 2 +- Validator/StrlenValidator.php | 4 ++-- Validator/Validator.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Mail/Mailer.php b/Mail/Mailer.php index 97e7bd4..48b8275 100644 --- a/Mail/Mailer.php +++ b/Mail/Mailer.php @@ -1,4 +1,4 @@ - * @link http://netmonsters.ru diff --git a/Validator/EqualValidator.php b/Validator/EqualValidator.php index e4c6745..b02e33f 100644 --- a/Validator/EqualValidator.php +++ b/Validator/EqualValidator.php @@ -7,7 +7,7 @@ * @since 2010-04-26 */ -class EqualValidator extends \Majestic\Validator +class EqualValidator extends Validator { const NOT_EQUAL = 'not_match'; diff --git a/Validator/MbStrlenValidator.php b/Validator/MbStrlenValidator.php index 2506107..08f7a9e 100644 --- a/Validator/MbStrlenValidator.php +++ b/Validator/MbStrlenValidator.php @@ -9,7 +9,7 @@ * */ -class MbStrlenValidator extends \Majestic\Validator +class MbStrlenValidator extends Validator { const GREATHER_THAN = 'not_match'; @@ -27,7 +27,7 @@ class MbStrlenValidator extends \Majestic\Validator { $this->setValue($value); if ($this->token === null) { - throw new InitializationException('Token not defined.'); + throw new \Majestic\Exception\InitializationException('Token not defined.'); } if (mb_strlen($value) > $this->token) { diff --git a/Validator/NotEmptyValidator.php b/Validator/NotEmptyValidator.php index f4b0281..ed9c82d 100644 --- a/Validator/NotEmptyValidator.php +++ b/Validator/NotEmptyValidator.php @@ -7,7 +7,7 @@ * @since 2010-04-26 */ -class NotEmptyValidator extends \Majestic\Validator +class NotEmptyValidator extends Validator { const IS_EMPTY = 'is_empty'; diff --git a/Validator/StrlenValidator.php b/Validator/StrlenValidator.php index 2d7021a..4bbbd35 100644 --- a/Validator/StrlenValidator.php +++ b/Validator/StrlenValidator.php @@ -9,7 +9,7 @@ * */ -class StrlenValidator extends \Majestic\Validator +class StrlenValidator extends Validator { const GREATHER_THAN = 'not_match'; @@ -27,7 +27,7 @@ class StrlenValidator extends \Majestic\Validator { $this->setValue($value); if ($this->token === null) { - throw new InitializationException('Token not defined.'); + throw new \Majestic\Exception\InitializationException('Token not defined.'); } if (strlen($value) > $this->token) { diff --git a/Validator/Validator.php b/Validator/Validator.php index 04c8264..a5f2f51 100644 --- a/Validator/Validator.php +++ b/Validator/Validator.php @@ -49,7 +49,7 @@ abstract class Validator implements iValidator protected function createMessage($template, $value) { if (!isset($this->templates[$template])) { - throw new GeneralException('Message template "' . $template . '" unknown.'); + throw new \Majestic\Exception\GeneralException('Message template "' . $template . '" unknown.'); } $message = $this->templates[$template];