當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AbstractProvider::__construct方法代碼示例

本文整理匯總了PHP中League\OAuth2\Client\Provider\AbstractProvider::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP AbstractProvider::__construct方法的具體用法?PHP AbstractProvider::__construct怎麽用?PHP AbstractProvider::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在League\OAuth2\Client\Provider\AbstractProvider的用法示例。


在下文中一共展示了AbstractProvider::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Constructs an OAuth 2.0 service provider.
  *
  * @param array $options An array of options to set on this provider.
  *     Options include `clientId`, `clientSecret`, `redirectUri`, and `state`.
  *     Individual providers may introduce more options, as needed.
  * @param array $collaborators An array of collaborators that may be used to
  *     override this provider's default behavior. Collaborators include
  *     `grantFactory`, `requestFactory`, `httpClient`, and `randomFactory`.
  *     Individual providers may introduce more collaborators, as needed.
  */
 public function __construct(array $options = [], array $collaborators = [])
 {
     parent::__construct($options, $collaborators);
     if ($this->token) {
         $this->token = new ModulbankAccessToken(['accessToken' => $this->token]);
     }
 }
開發者ID:slowprog,項目名稱:oauth2-modulbank,代碼行數:18,代碼來源:Modulbank.php

示例2: __construct

 public function __construct($options = [])
 {
     if (empty($options['domainPrefix'])) {
         throw new \RuntimeException('Vend provider requires a "domainPrefix" option');
     }
     parent::__construct($options);
 }
開發者ID:wheniwork,項目名稱:oauth2-vend,代碼行數:7,代碼來源:Vend.php

示例3: __construct

 /**
  * Provider constructor.
  * @param array $options
  */
 public function __construct(array $options = array())
 {
     parent::__construct($options);
     if (isset($options['sandbox']) && $options['sandbox']) {
         $this->baseURL = 'https://api.sandbox.freeagent.com/v2/';
     }
 }
開發者ID:6by6,項目名稱:freeagent-php,代碼行數:11,代碼來源:Provider.php

示例4: __construct

 public function __construct()
 {
     parent::__construct(['clientId' => Mage::getStoreConfig('octahedron_pos/connection/client_id'), 'clientSecret' => Mage::getStoreConfig('octahedron_pos/connection/client_secret')]);
     $this->url = 'https://' . Mage::getStoreConfig('octahedron_pos/connection/url');
     $this->headers['Accept'] = 'application/json';
     $this->cache = Mage::app()->getCache();
 }
開發者ID:octahedron,項目名稱:octasync-magento,代碼行數:7,代碼來源:Api.php

示例5: __construct

 /**
  * @param array $options
  * @param array $collaborators
  */
 public function __construct($options = [], array $collaborators = [])
 {
     parent::__construct($options);
     if (isset($options['devMode'])) {
         $this->setDevMode($options['devMode']);
     }
 }
開發者ID:tmannherz,項目名稱:oauth2-ringcentral,代碼行數:11,代碼來源:Ringcentral.php

示例6: __construct

 /**
  * Gitlab constructor.
  *
  * @param array $options
  * @param array $collaborators
  */
 public function __construct(array $options, array $collaborators = [])
 {
     if (isset($options['domain'])) {
         $this->domain = $options['domain'];
     }
     parent::__construct($options, $collaborators);
 }
開發者ID:omines,項目名稱:oauth2-gitlab,代碼行數:13,代碼來源:Gitlab.php

示例7: __construct

 public function __construct($options = [])
 {
     parent::__construct($options);
     if (isset($options['testMode'])) {
         $this->testMode = $options['testMode'];
     }
 }
開發者ID:lemonstand,項目名稱:oauth2-amazon,代碼行數:7,代碼來源:Amazon.php

示例8: __construct

 /**
  * Constructs an OAuth 2.0 service provider.
  *
  * @param array $options An array of options to set on this provider.
  *     Options include `clientId`, `clientSecret`, `redirectUri`, and `state`.
  *     Individual providers may introduce more options, as needed.
  * @param array $collaborators An array of collaborators that may be used to
  *     override this provider's default behavior. Collaborators include
  *     `grantFactory`, `requestFactory`, `httpClient`, and `randomFactory`.
  *     Individual providers may introduce more collaborators, as needed.
  */
 public function __construct(array $options = [], array $collaborators = [])
 {
     parent::__construct($options, $collaborators);
     if (empty($this->subdomain)) {
         throw new Exception\ProviderConfigurationException('No subdomain has been configured for this Zendesk provider; it has to have a subdomain.');
     }
 }
開發者ID:stevenmaguire,項目名稱:oauth2-zendesk,代碼行數:18,代碼來源:Zendesk.php

示例9: __construct

 public function __construct($options = [])
 {
     if (!array_has($options, 'redirectUri')) {
         $options['redirectUri'] = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
     }
     parent::__construct($options);
 }
開發者ID:eds,項目名稱:oauth-client,代碼行數:7,代碼來源:QQ.php

示例10: __construct

 /**
  * Constructs an OAuth 2.0 service provider.
  *
  * Override to add UserFactory
  *
  * @param array $options An array of options to set on this provider.
  *     Options include `clientId`, `clientSecret`, `redirectUri`, and `state`.
  *     Individual providers may introduce more options, as needed.
  * @param array $collaborators An array of collaborators that may be used to
  *     override this provider's default behavior. Collaborators include
  *     `grantFactory`, `requestFactory`, `httpClient`, and `randomFactory`.
  *     Individual providers may introduce more collaborators, as needed.
  */
 public function __construct(array $options = [], array $collaborators = [])
 {
     parent::__construct($options, $collaborators);
     if (empty($collaborators['userFactory'])) {
         $collaborators['userFactory'] = new UserFactory();
     }
     $this->setUserFactory($collaborators['userFactory']);
 }
開發者ID:schoolrunner,項目名稱:oauth2-clever,代碼行數:21,代碼來源:Clever.php

示例11: __construct

 /**
  * Constructs an OAuth 2.0 service provider.
  *
  * @param array $options An array of options to set on this provider.
  *     Options include `clientId`, `clientSecret`, `redirectUri`, and `state`.
  *     Individual providers may introduce more options, as needed.
  * @param array $collaborators An array of collaborators that may be used to
  *     override this provider's default behavior. Collaborators include
  *     `grantFactory`, `requestFactory`, `httpClient`, and `randomFactory`.
  *     Individual providers may introduce more collaborators, as needed.
  */
 public function __construct(array $options = [], array $collaborators = [])
 {
     if (isset($options['encryptionKeyPath'])) {
         $this->setEncryptionKeyPath($options['encryptionKeyPath']);
         unset($options['encryptionKeyPath']);
     }
     parent::__construct($options, $collaborators);
 }
開發者ID:stevenmaguire,項目名稱:oauth2-keycloak,代碼行數:19,代碼來源:Keycloak.php

示例12: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct(array $options = [], array $collaborators = [])
 {
     if (!empty($options['domain'])) {
         $this->domain = $options['domain'];
         // for custom environments
     }
     parent::__construct($options, $collaborators);
 }
開發者ID:angelcam,項目名稱:angelcam-sdk-php,代碼行數:11,代碼來源:Angelcam.php

示例13: __construct

 public function __construct($options = array())
 {
     if (empty($options['rootUrl'])) {
         throw new UnexpectedValueException('Missing rootUrl configuration');
     }
     parent::__construct($options);
     $this->_domain = rtrim($options['rootUrl'], '/');
 }
開發者ID:xintesa,項目名稱:socialites,代碼行數:8,代碼來源:CroogoProvider.php

示例14: __construct

 public function __construct(array $options = [], array $collaborators = [])
 {
     parent::__construct($options, $collaborators);
     if (!isset($options['account'])) {
         throw new HumanClientException('Account must be supllied');
     }
     $this->changeDomainUrl($options['account']);
 }
開發者ID:indibeast,項目名稱:oauth2-human,代碼行數:8,代碼來源:Human.php

示例15: __construct

 public function __construct($options = [])
 {
     parent::__construct($options);
     if (empty($options['graphApiVersion'])) {
         $message = 'The "graphApiVersion" option not set. Please set a default Graph API version.';
         throw new \InvalidArgumentException($message);
     }
     $this->graphApiVersion = $options['graphApiVersion'];
 }
開發者ID:savks,項目名稱:oauth2-facebook,代碼行數:9,代碼來源:Facebook.php


注:本文中的League\OAuth2\Client\Provider\AbstractProvider::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。