You are here

protected function xautoload_ClassFinder_NamespaceOrPrefix::namespacePathFragment in X Autoload 7.3

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 DIRECTORY_SEPARATOR.

6 calls to xautoload_ClassFinder_NamespaceOrPrefix::namespacePathFragment()
xautoload_ClassFinder_NamespaceOrPrefix::registerNamespaceDeep in lib/ClassFinder/NamespaceOrPrefix.php
Alias for registerNamespaceDeepLocation()
xautoload_ClassFinder_NamespaceOrPrefix::registerNamespaceDeepLocation in lib/ClassFinder/NamespaceOrPrefix.php
Register a deep filesystem location for a given namespace.
xautoload_ClassFinder_NamespaceOrPrefix::registerNamespacePlugin in lib/ClassFinder/NamespaceOrPrefix.php
Register a plugin for a namespace.
xautoload_ClassFinder_NamespaceOrPrefix::registerNamespaceRoot in lib/ClassFinder/NamespaceOrPrefix.php
Register a PSR-0 root folder for a given namespace.
xautoload_ClassFinder_NamespaceOrPrefix::registerNamespacesDeep in lib/ClassFinder/NamespaceOrPrefix.php
Register a number of "deep" namespace directories at once.

... See full list

File

lib/ClassFinder/NamespaceOrPrefix.php, line 197

Class

xautoload_ClassFinder_NamespaceOrPrefix

Code

protected function namespacePathFragment($namespace) {
  return strlen($namespace) ? str_replace('\\', DIRECTORY_SEPARATOR, rtrim($namespace, '\\') . '\\') : '';
}