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