wrappers[$scheme] = $classname; return stream_wrapper_register($scheme, $classname); } function unregister($scheme) { if (stream_wrapper_unregister($scheme)) { unset(self::$this->wrappers[$scheme]); return TRUE; } return FALSE; } /** * Return the streamwrapper classname for a given scheme. * @param string $scheme stream scheme. * @return mixed string is a scheme has a registered handler or FALSE. */ function classname($scheme) { if (empty(self::$this->wrappers[$scheme])) { return FALSE; } return self::$this->wrappers[$scheme]; } /** * Return the stream class name for a given scheme. * @param string $scheme stream scheme. * @return mixed string is a scheme has a registered handler or FALSE. */ function scheme($class) { return array_search(self::$this->wrappers, $class); } /** * Return the DrupalStreamWrapperManager's wrapper registry. */ function wrappers() { return self::$this->wrappers; } }