/** * * @param int $code * @throws \Core_Exception_ServiceLayer_Verification */ public function validateCaptcha($code) { $captcha = \Sica_Captcha_Adapter::factory(); if ($captcha->checkCode($code) === FALSE) { $this->getMessaging()->addErrorMessage('MN011'); throw new \Core_Exception_ServiceLayer_Verification(); } }
public function captchaAudioAction() { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $img = Sica_Captcha_Adapter::factory(); $img->audioPath(APPLICATION_PATH . '/../public/captcha/audio/pt/'); $img->playAudio(); }