You are here

function file_stream_wrapper_get_class in Drupal 7

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 calls to 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 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
Checks that the scheme of a stream URI is valid.
StreamWrapperTest::testGetClassName in modules/simpletest/tests/file.test
Test the getClassName() function.

File

includes/file.inc, line 182
API for handling file uploads and server file management.

Code

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