Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UriResolver.php

function UriResolver::normalizePath

Normalizes a URI path component by removing dot-slash and double slashes

Parameters

string $path:

Return value

string

1 call to UriResolver::normalizePath()
UriResolver::combineRelativePathWithBasePath in vendor/justinrainbow/json-schema/src/JsonSchema/Uri/UriResolver.php
Tries to glue a relative path onto an absolute one

File

vendor/justinrainbow/json-schema/src/JsonSchema/Uri/UriResolver.php, line 156

Class

UriResolver
Resolves JSON Schema URIs

Namespace

JsonSchema\Uri

Code

private static function normalizePath($path) {
    $path = preg_replace('|((?<!\\.)\\./)*|', '', $path);
    $path = preg_replace('|//|', '/', $path);
    return $path;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal