web/lib/Zend/Captcha/ReCaptcha.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';
    33  * @see http://recaptcha.net/apidocs/captcha/
    33  * @see http://recaptcha.net/apidocs/captcha/
    34  *
    34  *
    35  * @category   Zend
    35  * @category   Zend
    36  * @package    Zend_Captcha
    36  * @package    Zend_Captcha
    37  * @subpackage Adapter
    37  * @subpackage Adapter
    38  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    38  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
    39  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    39  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    40  * @version    $Id: ReCaptcha.php 24593 2012-01-05 20:35:02Z matthew $
    40  * @version    $Id$
    41  */
    41  */
    42 class Zend_Captcha_ReCaptcha extends Zend_Captcha_Base
    42 class Zend_Captcha_ReCaptcha extends Zend_Captcha_Base
    43 {
    43 {
    44     /**@+
    44     /**@+
    45      * ReCaptcha Field names
    45      * ReCaptcha Field names
   133     }
   133     }
   134 
   134 
   135     /**
   135     /**
   136      * Constructor
   136      * Constructor
   137      *
   137      *
   138      * @param  array|Zend_Config $options
   138      * @param array|Zend_Config $options
   139      * @return void
       
   140      */
   139      */
   141     public function __construct($options = null)
   140     public function __construct($options = null)
   142     {
   141     {
   143         $this->setService(new Zend_Service_ReCaptcha());
   142         $this->setService(new Zend_Service_ReCaptcha());
   144         $this->_serviceParams = $this->getService()->getParams();
   143         $this->_serviceParams = $this->getService()->getParams();
   213 
   212 
   214     /**
   213     /**
   215      * Validate captcha
   214      * Validate captcha
   216      *
   215      *
   217      * @see    Zend_Validate_Interface::isValid()
   216      * @see    Zend_Validate_Interface::isValid()
   218      * @param  mixed $value
   217      * @param  mixed      $value
       
   218      * @param  array|null $context
   219      * @return boolean
   219      * @return boolean
   220      */
   220      */
   221     public function isValid($value, $context = null)
   221     public function isValid($value, $context = null)
   222     {
   222     {
   223         if (!is_array($value) && !is_array($context)) {
   223         if (!is_array($value) && !is_array($context)) {