Correct namespace in Valdiators. Add namespace Mail.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php namespace Majestic\Mail;
|
||||
/**
|
||||
* @copyright NetMonsters <team@netmonsters.ru>
|
||||
* @link http://netmonsters.ru
|
||||
|
@ -7,7 +7,7 @@
|
||||
* @since 2010-04-26
|
||||
*/
|
||||
|
||||
class EqualValidator extends \Majestic\Validator
|
||||
class EqualValidator extends Validator
|
||||
{
|
||||
|
||||
const NOT_EQUAL = 'not_match';
|
||||
|
@ -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) {
|
||||
|
@ -7,7 +7,7 @@
|
||||
* @since 2010-04-26
|
||||
*/
|
||||
|
||||
class NotEmptyValidator extends \Majestic\Validator
|
||||
class NotEmptyValidator extends Validator
|
||||
{
|
||||
|
||||
const IS_EMPTY = 'is_empty';
|
||||
|
@ -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) {
|
||||
|
@ -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];
|
||||
|
Reference in New Issue
Block a user