You are here

public function CertManager::resolveCertPath in Lockr 4.x

Returns the absolute path for the given cert path.

Parameters

string $cert_path: The Lockr cert path.

Return value

string The resolved path.

1 call to CertManager::resolveCertPath()
CertManager::certPath in src/CertManager.php
Returns the current custom cert path.

File

src/CertManager.php, line 129

Class

CertManager
Helper class for managing Lockr certificates.

Namespace

Drupal\lockr

Code

public function resolveCertPath($cert_path) {
  if (strpos($cert_path, '/') === 0) {
    return $cert_path;
  }
  if (strpos($cert_path, 'private://') === 0) {
    return $this->fileSystem
      ->realpath($cert_path);
  }
  return $this->fileSystem
    ->realpath("{$this->drupalRoot}/{$cert_path}");
}