Correct namespace in Valdiators. Add namespace Mail.

This commit is contained in:
2014-06-04 21:57:19 +04:00
parent 1ba341b064
commit 3709fb2a74
6 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
<?php <?php namespace Majestic\Mail;
/** /**
* @copyright NetMonsters <team@netmonsters.ru> * @copyright NetMonsters <team@netmonsters.ru>
* @link http://netmonsters.ru * @link http://netmonsters.ru

View File

@ -7,7 +7,7 @@
* @since 2010-04-26 * @since 2010-04-26
*/ */
class EqualValidator extends \Majestic\Validator class EqualValidator extends Validator
{ {
const NOT_EQUAL = 'not_match'; const NOT_EQUAL = 'not_match';

View File

@ -9,7 +9,7 @@
* *
*/ */
class MbStrlenValidator extends \Majestic\Validator class MbStrlenValidator extends Validator
{ {
const GREATHER_THAN = 'not_match'; const GREATHER_THAN = 'not_match';
@ -27,7 +27,7 @@ class MbStrlenValidator extends \Majestic\Validator
{ {
$this->setValue($value); $this->setValue($value);
if ($this->token === null) { if ($this->token === null) {
throw new InitializationException('Token not defined.'); throw new \Majestic\Exception\InitializationException('Token not defined.');
} }
if (mb_strlen($value) > $this->token) { if (mb_strlen($value) > $this->token) {

View File

@ -7,7 +7,7 @@
* @since 2010-04-26 * @since 2010-04-26
*/ */
class NotEmptyValidator extends \Majestic\Validator class NotEmptyValidator extends Validator
{ {
const IS_EMPTY = 'is_empty'; const IS_EMPTY = 'is_empty';

View File

@ -9,7 +9,7 @@
* *
*/ */
class StrlenValidator extends \Majestic\Validator class StrlenValidator extends Validator
{ {
const GREATHER_THAN = 'not_match'; const GREATHER_THAN = 'not_match';
@ -27,7 +27,7 @@ class StrlenValidator extends \Majestic\Validator
{ {
$this->setValue($value); $this->setValue($value);
if ($this->token === null) { if ($this->token === null) {
throw new InitializationException('Token not defined.'); throw new \Majestic\Exception\InitializationException('Token not defined.');
} }
if (strlen($value) > $this->token) { if (strlen($value) > $this->token) {

View File

@ -49,7 +49,7 @@ abstract class Validator implements iValidator
protected function createMessage($template, $value) protected function createMessage($template, $value)
{ {
if (!isset($this->templates[$template])) { 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]; $message = $this->templates[$template];