コード例 #1
0
ファイル: ReCaptcha.php プロジェクト: as-sar/ZF2-NoCaptcha
 /**
  * @param null $options
  */
 public function __construct($options = null)
 {
     $this->setService(new ReCaptchaService());
     parent::__construct($options);
     if (!empty($options)) {
         if (array_key_exists('site_key', $options)) {
             $this->setSiteKey($options['site_key']);
         }
         if (array_key_exists('secret_key', $options)) {
             $this->setSecretKey($options['secret_key']);
         }
         $this->setOptions($options);
     }
 }
コード例 #2
0
 /**
  * @param null $options
  */
 public function __construct($options = null)
 {
     $options = $options === null ? [] : $options;
     $serviceOptions = array_key_exists('service_options', $options) ? $options['service_options'] : null;
     $this->setService(new ReCaptchaService(null, $serviceOptions));
     parent::__construct($options);
     if (!empty($options)) {
         if (array_key_exists('site_key', $options)) {
             $this->setSiteKey($options['site_key']);
         }
         if (array_key_exists('secret_key', $options)) {
             $this->setSecretKey($options['secret_key']);
         }
         $this->setOptions($options);
     }
 }
コード例 #3
0
ファイル: ReCaptcha.php プロジェクト: navtis/xerxes-pazpar2
 /**
  * Constructor
  *
  * @param  array|\Zend\Config\Config $options
  * @return void
  */
 public function __construct($options = null)
 {
     $this->setService(new ReCaptchaService());
     $this->_serviceParams = $this->getService()->getParams();
     $this->_serviceOptions = $this->getService()->getOptions();
     parent::__construct($options);
     if ($options instanceof \Zend\Config\Config) {
         $options = $options->toArray();
     }
     if (!empty($options)) {
         $this->setOptions($options);
     }
 }
コード例 #4
0
ファイル: ReCaptcha.php プロジェクト: razvansividra/pnlzf2-1
 /**
  * Constructor
  *
  * @param  null|array|Traversable $options
  */
 public function __construct($options = null)
 {
     $this->setService(new ReCaptchaService());
     $this->serviceParams = $this->getService()->getParams();
     $this->serviceOptions = $this->getService()->getOptions();
     parent::__construct($options);
     if (!empty($options)) {
         $this->setOptions($options);
     }
 }
コード例 #5
0
ファイル: ReCaptcha.php プロジェクト: idwsdta/INIT-frame
 /**
  * Constructor
  *
  * @param  null|array|Traversable $options
  */
 public function __construct($options = null)
 {
     $this->setService(new ReCaptchaService());
     $this->serviceParams = $this->getService()->getParams();
     $this->serviceOptions = $this->getService()->getOptions();
     parent::__construct($options);
     if (!empty($options)) {
         if (array_key_exists('private_key', $options)) {
             $this->getService()->setPrivateKey($options['private_key']);
         }
         if (array_key_exists('public_key', $options)) {
             $this->getService()->setPublicKey($options['public_key']);
         }
         $this->setOptions($options);
     }
 }