Open Data Catalog v2.0.0
Drupal\common\UrlHostTokenResolver Class Reference

Static Public Member Functions

static getServerPublicFilesUrl ()
 
static resolve (string $resourceUrl)
 
static resolveFilePath (string $resourceUrl)
 

Public Attributes

const TOKEN = "h-o.st"
 
const PUBLIC_SCHEME = 'public://'
 

Detailed Description

UrlHostTokenResolver.

Todo:
Convert to service with Dependency Injection.

Definition at line 10 of file UrlHostTokenResolver.php.

Member Function Documentation

◆ getServerPublicFilesUrl()

static Drupal\common\UrlHostTokenResolver::getServerPublicFilesUrl ( )
static

Get the HTTP server public files URL.

Returns
string|null The HTTP server public files URL, or NULL in the case of failure.

Definition at line 20 of file UrlHostTokenResolver.php.

◆ resolve()

static Drupal\common\UrlHostTokenResolver::resolve ( string  $resourceUrl)
static

Resolve hostified resource URL to actual domain URL.

Parameters
string$resourceUrlHostified resource URL.
Returns
string Resolved resource URL (with actual domain).

Definition at line 37 of file UrlHostTokenResolver.php.

◆ resolveFilePath()

static Drupal\common\UrlHostTokenResolver::resolveFilePath ( string  $resourceUrl)
static

Resolve host token string to public file path.

Parameters
string$resourceUrlFull temporary token URL.
Returns
string Resolved public file path.

Definition at line 59 of file UrlHostTokenResolver.php.

Member Data Documentation

◆ PUBLIC_SCHEME

const Drupal\common\UrlHostTokenResolver::PUBLIC_SCHEME = 'public://'

Definition at line 12 of file UrlHostTokenResolver.php.

◆ TOKEN

const Drupal\common\UrlHostTokenResolver::TOKEN = "h-o.st"

Definition at line 11 of file UrlHostTokenResolver.php.