You are here

public function Repository::__construct in Views OAI-PMH 8

File

src/Service/Repository.php, line 38

Class

Repository

Namespace

Drupal\views_oai_pmh\Service

Code

public function __construct(ConfigFactoryInterface $config, RequestStack $request) {
  $system_site = $config
    ->get('system.site');
  $this->siteName = $system_site
    ->getOriginal('name', FALSE);
  $this->mail = $system_site
    ->get('mail');
  $currentRequest = $request
    ->getCurrentRequest();
  $this->host = $currentRequest
    ->getHost();
  $this->path = $currentRequest
    ->getPathInfo();
  $this->scheme = $currentRequest
    ->getScheme() . '://';
  $this->port = ':' . $currentRequest
    ->getPort();
}