コード例 #1
0
 /**
  * Constructor.
  *
  * @param array $options
  * @param array $collaborators
  */
 public function __construct(array $options = [], array $collaborators = [])
 {
     if (empty($options)) {
         $options = ['urlAuthorize' => 'invalid', 'urlAccessToken' => 'invalid', 'urlResourceOwnerDetails' => 'invalid'];
     }
     parent::__construct($options, $collaborators);
 }
コード例 #2
0
 public function __construct(array $options = [], array $collaborators = [])
 {
     $this->assertPdffillerOptions($options);
     $possible = $this->getPdffillerOptions();
     $configured = array_intersect_key($options, array_flip($possible));
     foreach ($configured as $key => $value) {
         $this->{$key} = $value;
     }
     // Remove all options that are only used locally
     $options = array_diff_key($options, $configured);
     $options = array_merge(['redirectUri' => 'http://localhost/redirect_uri', 'urlAuthorize' => 'http://localhost/url_authorize', 'urlResourceOwnerDetails' => 'http://localhost/url_resource_owner_details'], $options);
     // init here
     parent::__construct($options, $collaborators);
     // then init new grant
     $this->getGrantFactory()->setGrant(InternalGrant::NAME, new InternalGrant());
 }
コード例 #3
0
 public function __construct(array $options = array(), array $collaborators = array())
 {
     if (!array_key_exists('url', $options)) {
         throw new InvalidArgumentException('Required options not defined: url');
     }
     $this->apiUrl = $options['url'] . '/api/v2';
     if (!array_key_exists('urlAuthorize', $options)) {
         $options['urlAuthorize'] = $options['url'] . '/oauth2/authorize';
     }
     if (!array_key_exists('urlAccessToken', $options)) {
         $options['urlAccessToken'] = $options['url'] . '/oauth2/token';
     }
     if (!array_key_exists('urlResourceOwnerDetails', $options)) {
         $options['urlResourceOwnerDetails'] = null;
     }
     parent::__construct($options, $collaborators);
 }