function StreamWrapperManagerInterface::normalizeUri

Same name in other branches
  1. 9 core/lib/Drupal/Core/StreamWrapper/StreamWrapperManagerInterface.php \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::normalizeUri()
  2. 8.9.x core/lib/Drupal/Core/StreamWrapper/StreamWrapperManagerInterface.php \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::normalizeUri()
  3. 11.x 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.

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);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.