Exemple #1
0
 /**
  * @param StorageInterface         $tokenStorage
  * @param StorageRegistryInterface $storageRegistry
  * @param string                   $baseUrl
  */
 public function __construct(StorageInterface $tokenStorage, StorageRegistryInterface $storageRegistry, $baseUrl = null)
 {
     parent::__construct($tokenStorage, $storageRegistry);
     if ($baseUrl) {
         $this->baseUrl = $baseUrl;
     } else {
         $this->baseUrl = Url::createFromServer($_SERVER)->getBaseUrl();
     }
 }
Exemple #2
0
 /**
  * @param StorageInterface         $tokenStorage
  * @param StorageRegistryInterface $storageRegistry
  * @param UrlGeneratorInterface    $urlGenerator
  */
 public function __construct(StorageInterface $tokenStorage, StorageRegistryInterface $storageRegistry, UrlGeneratorInterface $urlGenerator)
 {
     $this->urlGenerator = $urlGenerator;
     parent::__construct($tokenStorage, $storageRegistry);
 }
Exemple #3
0
 /**
  * @param StorageInterface         $tokenStorage
  * @param StorageRegistryInterface $storageRegistry
  * @param string                   $baseUrl
  */
 public function __construct(StorageInterface $tokenStorage, StorageRegistryInterface $storageRegistry, $baseUrl = null)
 {
     parent::__construct($tokenStorage, $storageRegistry);
     $this->baseUrl = $baseUrl ? HttpUri::createFromString($baseUrl) : HttpUri::createFromServer($_SERVER);
 }