Browse Source

Correct namespace in Valdiators. Add namespace Mail.

namespace
Alexander Demidov 10 years ago
parent
commit
3709fb2a74
  1. 2
      Mail/Mailer.php
  2. 2
      Validator/EqualValidator.php
  3. 4
      Validator/MbStrlenValidator.php
  4. 2
      Validator/NotEmptyValidator.php
  5. 4
      Validator/StrlenValidator.php
  6. 2
      Validator/Validator.php

2
Mail/Mailer.php

@ -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

2
Validator/EqualValidator.php

@ -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';

4
Validator/MbStrlenValidator.php

@ -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) {

2
Validator/NotEmptyValidator.php

@ -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';

4
Validator/StrlenValidator.php

@ -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) {

2
Validator/Validator.php

@ -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];

Loading…
Cancel
Save