You are here

public static function ResourceStreamWrapperManager::singleton in D7 Media 6

Load the singleton instance of the StreamWrapperManager.

Return value

object:StreamWrapperManager

2 calls to ResourceStreamWrapperManager::singleton()
Resource::__construct in resource/resource.module
drupal_file constructor.
resource_init in resource/resource.module
Implementation of hook_init().

File

resource/ResourceStreamWrapperManager.inc, line 21

Class

ResourceStreamWrapperManager
The StreamWrapperManager provides a class for managing and querying user defined stream wrappers in PHP. PHP's internal stream_get_wrappers doesn't return the class registered to handle a stream. We need to be able to find the handler class…

Code

public static function singleton() {
  static $instance = NULL;
  if (is_null($instance)) {
    $instance = new ResourceStreamWrapperManager();
  }
  return $instance;
}