/** * @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); } }
/** * @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); } }
/** * 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); } }
/** * 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); } }
/** * 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); } }