You are here

public function StreamWrapperManagerInterface::normalizeUri in Drupal 9

Same name and namespace in other branches
  1. 8 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);