diff options
Diffstat (limited to 'libs/Zend/Validate/Alpha.php')
-rw-r--r-- | libs/Zend/Validate/Alpha.php | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/libs/Zend/Validate/Alpha.php b/libs/Zend/Validate/Alpha.php index 42864fa561..ce1f01872f 100644 --- a/libs/Zend/Validate/Alpha.php +++ b/libs/Zend/Validate/Alpha.php @@ -14,33 +14,33 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Alpha.php 20442 2010-01-20 15:15:40Z matthew $ + * @version $Id: Alpha.php 16223 2009-06-21 20:04:53Z thomas $ */ /** * @see Zend_Validate_Abstract */ -// require_once 'Zend/Validate/Abstract.php'; +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Alpha extends Zend_Validate_Abstract { const INVALID = 'alphaInvalid'; const NOT_ALPHA = 'notAlpha'; - const STRING_EMPTY = 'alphaStringEmpty'; + const STRING_EMPTY = 'stringEmpty'; /** * Whether to allow white space characters; off by default * * @var boolean - * @deprecated + * @depreciated */ public $allowWhiteSpace; @@ -58,30 +58,18 @@ class Zend_Validate_Alpha extends Zend_Validate_Abstract */ protected $_messageTemplates = array( self::INVALID => "Invalid type given, value should be a string", - self::NOT_ALPHA => "'%value%' contains non alphabetic characters", + self::NOT_ALPHA => "'%value%' has not only alphabetic characters", self::STRING_EMPTY => "'%value%' is an empty string" ); /** * Sets default option values for this instance * - * @param boolean|Zend_Config $allowWhiteSpace + * @param boolean $allowWhiteSpace * @return void */ public function __construct($allowWhiteSpace = false) { - if ($allowWhiteSpace instanceof Zend_Config) { - $allowWhiteSpace = $allowWhiteSpace->toArray(); - } - - if (is_array($allowWhiteSpace)) { - if (array_key_exists('allowWhiteSpace', $allowWhiteSpace)) { - $allowWhiteSpace = $allowWhiteSpace['allowWhiteSpace']; - } else { - $allowWhiteSpace = false; - } - } - $this->allowWhiteSpace = (boolean) $allowWhiteSpace; } @@ -133,7 +121,7 @@ class Zend_Validate_Alpha extends Zend_Validate_Abstract /** * @see Zend_Filter_Alpha */ - // require_once 'Zend/Filter/Alpha.php'; + require_once 'Zend/Filter/Alpha.php'; self::$_filter = new Zend_Filter_Alpha(); } |