ImageStyle::fileUriScheme

protected ImageStyle::fileUriScheme($uri)

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

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

@todo: Remove when https://www.drupal.org/node/2050759 is in.

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".

See also

file_uri_target()

File

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

Class

ImageStyle
Defines an image style configuration entity.

Namespace

Drupal\image\Entity

Code

protected function fileUriScheme($uri) {
  return file_uri_scheme($uri);
}
doc_Drupal
2016-10-29 09:19:30
Comments
Leave a Comment

Please login to continue.