You are here

public function StreamWrapperManagerInterface::normalizeUri in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/StreamWrapper/StreamWrapperManagerInterface.php \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::normalizeUri()
  2. 10 core/lib/Drupal/Core/StreamWrapper/StreamWrapperManagerInterface.php \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::normalizeUri()

Normalizes a URI by making it syntactically correct.

A stream is referenced as "scheme://target".

The following actions are taken:

  • Remove trailing slashes from target
  • Trim erroneous leading slashes from target. e.g. ":///" becomes "://".

Parameters

string $uri: String reference containing the URI to normalize.

Return value

string The normalized URI.

1 method overrides StreamWrapperManagerInterface::normalizeUri()
StreamWrapperManager::normalizeUri in core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php
Normalizes a URI by making it syntactically correct.

File

core/lib/Drupal/Core/StreamWrapper/StreamWrapperManagerInterface.php, line 202

Class

StreamWrapperManagerInterface
Provides a StreamWrapper manager.

Namespace

Drupal\Core\StreamWrapper

Code

public function normalizeUri($uri);