function xautoload_ClassFinder_NamespaceOrPrefix::registerNamespacesRoot in X Autoload 7.3
Register PSR-0 root folders for given namespaces.
Parameters
array $map: Associative array, the keys are the namespaces, the values are the directories.
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.
File
- lib/
ClassFinder/ NamespaceOrPrefix.php, line 46
Class
Code
function registerNamespacesRoot($map, $lazy_check = TRUE) {
$deep_map = array();
foreach ($map as $namespace => $path) {
$namespace_path_fragment = $this
->namespacePathFragment($namespace);
$deep_path = strlen($path) ? $path . DIRECTORY_SEPARATOR : '';
$deep_path .= $namespace_path_fragment;
$deep_map[$namespace_path_fragment][$deep_path] = $lazy_check;
}
$this->namespaceMap
->registerDeepPaths($deep_map);
}