Пример #1
0
 /**
  *
  * @return \Zend_Captcha_Image
  */
 private function getImageCaptcha()
 {
     self::initSessionConfig();
     $appPath = APP_PATH;
     $captcha = new \Zend_Captcha_Image();
     $captcha->setSession($this->getSession());
     $captcha->setKeepSession(true);
     $captcha->setFont($appPath . '/data/fonts/consola.ttf');
     $captcha->setImgDir(dirname($appPath) . '/public/_captcha');
     $captcha->setImgUrl('/_captcha');
     $captcha->setExpiration(600);
     $captcha->setWordlen(5);
     $captcha->setUseNumbers(false);
     return $captcha;
 }