You are here

static function Util::namespaceLogicalPath in X Autoload 7.5

Same name and namespace in other branches
  1. 7.4 lib/Util.php \Drupal\xautoload\Util::namespaceLogicalPath()

Replace the namespace separator with directory separator.

Parameters

string $namespace: Namespace without trailing namespace separator.

Return value

string Path fragment representing the namespace, with trailing '/'.

14 calls to Util::namespaceLogicalPath()
ClassFinder::add in src/ClassFinder/ClassFinder.php
Adds a PSR-0 style prefix. Alias for ->addPsr0().
ClassFinder::addNamespacePsr0 in src/ClassFinder/ClassFinder.php
Adds a PSR-0 style namespace.
ClassFinder::addPsr4 in src/ClassFinder/ClassFinder.php
Adds a PSR-4 style namespace.
ClassFinder::registerNamespaceDeep in src/ClassFinder/ClassFinder.php
Alias for registerNamespaceDeepLocation()
ClassFinder::registerNamespaceDeepLocation in src/ClassFinder/ClassFinder.php
Register a deep filesystem location for a given namespace.

... See full list

File

src/Util.php, line 142

Class

Util
A number of static methods that don't interact with any global state.

Namespace

Drupal\xautoload

Code

static function namespaceLogicalPath($namespace) {
  return strlen($namespace) ? str_replace('\\', '/', rtrim($namespace, '\\') . '\\') : '';
}