web/lib/Zend/Captcha/Word.php
changeset 1230 68c69c656a2c
parent 807 877f952ae2bd
equal deleted inserted replaced
1229:5a6b6e770365 1230:68c69c656a2c
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Captcha
    16  * @package    Zend_Captcha
    17  * @subpackage Adapter
    17  * @subpackage Adapter
    18  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  */
    20  */
    21 
    21 
    22 /** @see Zend_Captcha_Base */
    22 /** @see Zend_Captcha_Base */
    23 require_once 'Zend/Captcha/Base.php';
    23 require_once 'Zend/Captcha/Base.php';
    28  * Generates random word which user should recognise
    28  * Generates random word which user should recognise
    29  *
    29  *
    30  * @category   Zend
    30  * @category   Zend
    31  * @package    Zend_Captcha
    31  * @package    Zend_Captcha
    32  * @subpackage Adapter
    32  * @subpackage Adapter
    33  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    33  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
    34  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    34  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    35  * @version    $Id: Word.php 24593 2012-01-05 20:35:02Z matthew $
    35  * @version    $Id$
    36  */
    36  */
    37 abstract class Zend_Captcha_Word extends Zend_Captcha_Base
    37 abstract class Zend_Captcha_Word extends Zend_Captcha_Base
    38 {
    38 {
    39     /**#@+
    39     /**#@+
    40      * @var array Character sets
    40      * @var array Character sets
   185 
   185 
   186     /**
   186     /**
   187      * Set captcha identifier
   187      * Set captcha identifier
   188      *
   188      *
   189      * @param string $id
   189      * @param string $id
   190      * return Zend_Captcha_Word
   190      * @return Zend_Captcha_Word
   191      */
   191      */
   192     protected function _setId ($id)
   192     protected function _setId ($id)
   193     {
   193     {
   194         $this->_id = $id;
   194         $this->_id = $id;
   195         return $this;
   195         return $this;
   364 
   364 
   365     /**
   365     /**
   366      * Validate the word
   366      * Validate the word
   367      *
   367      *
   368      * @see    Zend_Validate_Interface::isValid()
   368      * @see    Zend_Validate_Interface::isValid()
   369      * @param  mixed $value
   369      * @param  mixed      $value
       
   370      * @param  array|null $context
   370      * @return boolean
   371      * @return boolean
   371      */
   372      */
   372     public function isValid($value, $context = null)
   373     public function isValid($value, $context = null)
   373     {
   374     {
   374         if (!is_array($value) && !is_array($context)) {
   375         if (!is_array($value) && !is_array($context)) {