file_stream_wrapper_uri_normalize($uri)
Normalizes a URI by making it syntactically correct.
A stream is referenced as "scheme://target".
The following actions are taken:
string $uri: String reference containing the URI to normalize.
string The normalized URI.
function file_stream_wrapper_uri_normalize($uri) { $scheme = \Drupal::service('file_system')->uriScheme($uri); if (file_stream_wrapper_valid_scheme($scheme)) { $target = file_uri_target($uri); if ($target !== FALSE) { $uri = $scheme . '://' . $target; } } return $uri; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!file.inc/function/file_stream_wrapper_uri_normalize/8.1.x