本文整理汇总了PHP中Provider::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Provider::__construct方法的具体用法?PHP Provider::__construct怎么用?PHP Provider::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Provider
的用法示例。
在下文中一共展示了Provider::__construct方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(array $options = array())
{
if (!extension_loaded('xcache')) {
throw new \RuntimeException('XCache does not installed or enabled in php.ini');
}
parent::__construct($options);
}
示例2: __construct
public function __construct(array $options = array())
{
parent::__construct($options);
$this->directory = $options['directory'];
if (!is_dir($this->directory) && !@mkdir($this->directory, 0777, true)) {
throw new \InvalidArgumentException(sprintf('The directory "%s" does not exists and could not be created.', $this->directory));
}
}
示例3: __construct
/**
* Constructs password login provider for the specified configuration.
*
* @param \PHPixie\Pixie $pixie Pixie dependency container
* @param \PHPixie\Pixie\Service $service Service instance that this login provider belongs to.
* @param string $config Name of the configuration
*/
public function __construct($pixie, $service, $config)
{
parent::__construct($pixie, $service, $config);
$this->app_id = $pixie->config->get($this->config_prefix . "app_id");
$this->app_secret = $pixie->config->get($this->config_prefix . "app_secret");
$this->permissions = $pixie->config->get($this->config_prefix . "permissions", array());
$this->fbid_field = $pixie->config->get($this->config_prefix . "fbid_field");
$this->access_token_key = "auth_{$config}_facebook_token";
$this->token_expires_key = "auth_{$config}_facebook_token_expires";
}
示例4: __construct
/**
* Constructs password login provider for the specified configuration.
*
* @param \PHPixie\Pixie $pixie Pixie dependency container
* @param \PHPixie\Pixie\Service $service Service instance that this login provider belongs to.
* @param string $config Name of the configuration
*/
public function __construct($pixie, $service, $config)
{
parent::__construct($pixie, $service, $config);
$this->login_field = $pixie->config->get($this->config_prefix . "login_field");
$this->password_field = $pixie->config->get($this->config_prefix . "password_field");
$this->hash_method = $pixie->config->get($this->config_prefix . "hash_method", 'md5');
$this->login_token_field = $pixie->config->get($this->config_prefix . "login_token_field", null);
if ($this->login_token_field) {
$this->login_token_lifetime = $pixie->config->get($this->config_prefix . "login_token_lifetime", 604800);
}
}
示例5: __construct
/**
* Constructs password login provider for the specified configuration.
*
* @param \PHPixie\Pixie $pixie Pixie dependency container
* @param \PHPixie\Pixie\Service $service Service instance that this login provider belongs to.
* @param string $config Name of the configuration
*/
public function __construct($pixie, $service, $config)
{
parent::__construct($pixie, $service, $config);
$this->oauth_consumer_key = $pixie->config->get($this->config_prefix . "oauth_consumer_key");
$this->oauth_consumer_secret = $pixie->config->get($this->config_prefix . "oauth_consumer_secret");
$this->oauth_signature_method = $pixie->config->get($this->config_prefix . "oauth_signature_method");
$this->oauth_version = $pixie->config->get($this->config_prefix . "oauth_version");
$this->twid_field = $pixie->config->get($this->config_prefix . "twid_field");
$this->access_token_key = "auth_{$config}_twitter_token";
$this->token_expires_key = "auth_{$config}_twitter_token_expires";
}
示例6: __construct
public function __construct(array $options = array())
{
// Now make sure we have the default scope to get user data
$options['scope'] = \Arr::merge(array('wl.basic', 'wl.emails'), (array) \Arr::get($options, 'scope', array()));
parent::__construct($options);
}
示例7: __construct
public function __construct($user, $password, $mode)
{
parent::__construct($user, $password, $mode);
}
示例8: __construct
/**
* @param $provider
* @param $cacheSize
*/
public function __construct($provider, $cacheSize)
{
parent::__construct();
$this->provider = $provider;
$this->setCacheSize($cacheSize);
}
示例9: __construct
public function __construct(array $options = array())
{
// Now make sure we have the default scope to get user data
$options['scope'] = \Arr::merge(array('https://www.google.com/m8/feeds'), (array) \Arr::get($options, 'scope', array()));
parent::__construct($options);
}
示例10: __construct
/**
* @param string $apiKey
*/
public function __construct($apiKey)
{
$this->apiKey = $apiKey;
parent::__construct();
}
示例11: __construct
/**
* __construct
*
* @param Manager $manager Manager instance
* @param string $service service name (case sensitive)
*/
public function __construct(Manager $manager, $service)
{
$this->response = new Response();
$this->response->setSuccess(false)->addErrorMessage(sprintf("No provider installed for %s", $service));
parent::__construct($manager, $service);
}