You are here

protected function ImageStyle::fileUriScheme in Drupal 8

Provides a wrapper for file_uri_scheme() to allow unit testing.

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 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\StreamWrapperManager::getTarget() instead.

See also

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

File

core/modules/image/src/Entity/ImageStyle.php, line 525

Class

ImageStyle
Defines an image style configuration entity.

Namespace

Drupal\image\Entity

Code

protected function fileUriScheme($uri) {
  @trigger_error('fileUriTarget() is deprecated in drupal:8.8.0. It will be removed from drupal:9.0.0. See https://www.drupal.org/node/3035273', E_USER_DEPRECATED);
  return StreamWrapperManager::getScheme($uri);
}