public function createImageCaptchaAction()
 {
     $captcha = new Captcha($this->getRequest()->getSession());
     $captcha->outputImage();
     /*return new Response(
           $captchaText,
           200,
           array(
               'Content-Type' => 'image/png',
               'Cache-Control' => 'no-cache'
           )
       );*/
 }
 public function portadaAction()
 {
     $captcha = new Captcha($this->getRequest()->getSession());
     $captcha->build(realpath('bundles/comun/images') . '/captcha.png');
     return $this->render('ComunBundle:Default:portada.html.twig');
 }
 /**
  * @return Response
  */
 public function refreshImageAction()
 {
     // $this->refreshCaptcha();
     $captcha = new Captcha($this->getRequest()->getSession());
     $captcha->build(realpath('bundles/comun/images') . '/captcha.png');
     //return  $this->render('ComunBundle::captcha.html.twig', array('time' => time()));
     return $this->render('ComunBundle::captcha.html.twig');
 }