/**
  * If the given captcha is valid
  *
  * @param string $value
  *
  * @return boolean
  */
 public function isValid($value)
 {
     $result = true;
     $captchaAdapter = $this->captchaAdapterFactory->getCaptchaAdapter($this->options['type']);
     if (!$captchaAdapter->isValid($value)) {
         $result = false;
         foreach ($captchaAdapter->getErrors() as $error) {
             $this->result->addError($error);
         }
     }
     return $result;
 }
 /**
  * Render the captcha block
  *
  * @param string $type Type of captcha to use
  *
  * @return string
  */
 public function render($type)
 {
     return $this->captchaAdapterFactory->getCaptchaAdapter($type)->render();
 }