コード例 #1
0
ファイル: RegisterFactory.php プロジェクト: vfulco/YAWIK
 /**
  * Create service
  *
  * @param ServiceLocatorInterface $serviceLocator
  *
  * @return Register
  */
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     /**
      * @var $filter RegisterInputFilter
      */
     $filter = $serviceLocator->get('Auth\\Form\\RegisterInputFilter');
     $config = $serviceLocator->get('Config');
     $captchaConfig = isset($config['captcha']) ? $config['captcha'] : array();
     $form = new Register(null, array('captcha' => $captchaConfig));
     $form->setInputfilter($filter);
     return $form;
 }
コード例 #2
0
 /**
  * Create service
  *
  * @param ServiceLocatorInterface $serviceLocator
  *
  * @return Register
  */
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     /**
      * @var $serviceLocator \Zend\Form\FormElementManager
      * @var $filter RegisterInputFilter
      */
     $filter = $serviceLocator->getServiceLocator()->get('Auth\\Form\\RegisterInputFilter');
     /* @var $config CaptchaOptions */
     $config = $serviceLocator->getServiceLocator()->get('Auth/CaptchaOptions');
     $form = new Register(null, $config);
     $form->setAttribute('id', 'registration');
     $form->setInputfilter($filter);
     return $form;
 }