function xautoload_ClassFinder_Helper_Map::registerRootPath in X Autoload 7.2
Same name and namespace in other branches
- 7.3 lib/ClassFinder/Helper/Map.php \xautoload_ClassFinder_Helper_Map::registerRootPath()
If a class file would be in $psr0_root . '/' . $first_part . $second_part then instead, we look in $root_path . '/' . $first_part . $second_part
Parameters
string $first_part: The would-be namespace path relative to PSR-0 root. That is, the namespace with '\\' replaced by DIRECTORY_SEPARATOR.
string $path: The filesystem location of the (PSR-0) root folder for the given namespace.
boolean $lazy_check: If TRUE, then it is yet unknown whether the directory exists. If during the process we find that it does not exist, we unregister it.
File
- lib/
ClassFinder/ Helper/ Map.php, line 56
Class
- xautoload_ClassFinder_Helper_Map
- Helper class for the class finder. This is not part of ClassFinder, because we want to use the same logic for namespaces (PSR-0) and prefixes (PEAR).
Code
function registerRootPath($first_part, $root_path) {
$deep_path = $root_path . DIRECTORY_SEPARATOR . $first_part;
$this
->registerDeepPath($first_part, $deep_path);
}