You are here

function xautoload_ClassFinder_NamespaceOrPrefix::registerNamespaceDeepLocation in X Autoload 7.2

Same name and namespace in other branches
  1. 7.3 lib/ClassFinder/NamespaceOrPrefix.php \xautoload_ClassFinder_NamespaceOrPrefix::registerNamespaceDeepLocation()

Register a deep filesystem location for a given namespace.

Parameters

string $namespace: The namespace, e.g. "My\Namespace"

string $path: The deep path, e.g. "../lib/My/Namespace"

boolean $lazy_check: If TRUE, then we are not sure if the directory at $path actually exists. If during the process we find the directory to be nonexistent, we unregister the path.

2 calls to xautoload_ClassFinder_NamespaceOrPrefix::registerNamespaceDeepLocation()
xautoload_ClassFinder_NamespaceOrPrefix::registerNamespaceDeep in lib/ClassFinder/NamespaceOrPrefix.php
Alias for registerNamespaceDeepLocation()
xautoload_ClassFinder_NamespaceOrPrefix::registerNamespaceRoot in lib/ClassFinder/NamespaceOrPrefix.php
Register a PSR-0 root folder for a given namespace.

File

lib/ClassFinder/NamespaceOrPrefix.php, line 68

Class

xautoload_ClassFinder_NamespaceOrPrefix

Code

function registerNamespaceDeepLocation($namespace, $path, $lazy_check = TRUE) {
  $path_prefix_symbolic = str_replace('\\', DIRECTORY_SEPARATOR, $namespace . '\\');
  $this->namespaceMap
    ->registerDeepPath($path_prefix_symbolic, $path . '/', $lazy_check);
}