You are here

public function FileSystemInterface::uriScheme in Drupal 8

Returns the scheme of a URI (e.g. a stream).

Parameters

string $uri: A stream, referenced as "scheme://target" or "data:target".

Return value

string|bool A string containing the name of the scheme, or FALSE if none. For example, the URI "public://example.txt" would return "public".

Deprecated

in drupal:8.8.0 and is removed from drupal:9.0.0. Use Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getScheme() instead.

See also

https://www.drupal.org/node/3035273

1 method overrides FileSystemInterface::uriScheme()
FileSystem::uriScheme in core/lib/Drupal/Core/File/FileSystem.php
Returns the scheme of a URI (e.g. a stream).

File

core/lib/Drupal/Core/File/FileSystemInterface.php, line 251

Class

FileSystemInterface
Provides an interface for helpers that operate on files and stream wrappers.

Namespace

Drupal\Core\File

Code

public function uriScheme($uri);