You are here

protected function SystemStreamWrapper::getSystemName in System stream wrapper 7

Get the module, theme, or profile name of the current URI.

4 calls to SystemStreamWrapper::getSystemName()
LibrarySystemStreamWrapper::getDirectoryPath in ./SystemStreamWrapper.inc
Implements abstract public function getDirectoryPath()
ModuleSystemStreamWrapper::getDirectoryPath in ./SystemStreamWrapper.inc
Implements abstract public function getDirectoryPath()
ProfileSystemStreamWrapper::getSystemName in ./SystemStreamWrapper.inc
Override SystemSteamWrapper::getSystemName() to support profile://current
ThemeSystemStreamWrapper::getSystemName in ./SystemStreamWrapper.inc
Override SystemSteamWrapper::getSystemName() to support theme://current, theme://default, and theme://admin
2 methods override SystemStreamWrapper::getSystemName()
ProfileSystemStreamWrapper::getSystemName in ./SystemStreamWrapper.inc
Override SystemSteamWrapper::getSystemName() to support profile://current
ThemeSystemStreamWrapper::getSystemName in ./SystemStreamWrapper.inc
Override SystemSteamWrapper::getSystemName() to support theme://current, theme://default, and theme://admin

File

./SystemStreamWrapper.inc, line 11

Class

SystemStreamWrapper
Drupal system stream wrapper abstract class.

Code

protected function getSystemName($uri = NULL) {
  if (!isset($uri)) {
    $uri = $this->uri;
  }
  list($scheme, $target) = explode('://', $uri, 2);
  $pos = strpos($target, '/');
  return $pos === FALSE ? $target : substr($target, 0, $pos);
}