file_stream_wrapper_get_class

  1. drupal
    1. 8
    2. 7
Versions
7 – 8 file_stream_wrapper_get_class($scheme)

Returns the stream wrapper class name for a given scheme.

Parameters

$scheme Stream scheme.

Return value

Return string if a scheme has a registered handler, or FALSE.

Related topics

▾ 4 functions call file_stream_wrapper_get_class()

file_stream_wrapper_get_instance_by_scheme in includes/file.inc
Returns a reference to the stream wrapper class responsible for a given scheme.
file_stream_wrapper_get_instance_by_uri in includes/file.inc
Returns a reference to the stream wrapper class responsible for a given URI.
file_stream_wrapper_valid_scheme in includes/file.inc
Check that the scheme of a stream URI is valid.
StreamWrapperTest::testGetClassName in modules/simpletest/tests/file.test
Test the getClassName() function.

Code

includes/file.inc, line 186

<?php
function file_stream_wrapper_get_class($scheme) {
  $wrappers = file_get_stream_wrappers();
  return empty($wrappers[$scheme]) ? FALSE : $wrappers[$scheme]['class'];
}
?>