Esempio n. 1
0
 public function isValid($value, $context = null)
 {
     $result = $this->_captcha->isValid($this->_data);
     if ($result === false) {
         $this->_errors = $this->_captcha->getErrors();
         $this->_messages = $this->_captcha->getMessages();
     }
     return $result;
 }
Esempio n. 2
0
 /**
  * Set option
  *
  * If option is a service parameter, proxies to the service. The same
  * goes for any service options (distinct from service params)
  *
  * @param  string $key
  * @param  mixed $value
  * @return Zend_Captcha_ReCaptcha
  */
 public function setOption($key, $value)
 {
     $service = $this->getService();
     if (isset($this->_serviceParams[$key])) {
         $service->setParam($key, $value);
         return $this;
     }
     if (isset($this->_serviceOptions[$key])) {
         $service->setOption($key, $value);
         return $this;
     }
     return parent::setOption($key, $value);
 }