You are here

protected static function PageProcessor::urlExtractPath in Mini site 8

Extract path from the URL.

Parameters

string $url: URL to assess.

Return value

string|null Path if exists in the URL, NULL otherwise.

4 calls to PageProcessor::urlExtractPath()
PageProcessor::processTagA in src/PageProcessor.php
Process <a> tag.
PageProcessor::processTagLink in src/PageProcessor.php
Process <link> tag.
PageProcessor::processTagScript in src/PageProcessor.php
Process <script> tag.
PageProcessor::processTagStyle in src/PageProcessor.php
Process <style> tag.

File

src/PageProcessor.php, line 300

Class

PageProcessor
Class PageProcessor.

Namespace

Drupal\minisite

Code

protected static function urlExtractPath($url) {
  $parsed = UrlHelper::parse($url);
  return isset($parsed['path']) ? $parsed['path'] : NULL;
}