function xautoload_InjectedAPI_hookXautoload::namespaceRoot in X Autoload 7.3
Same name and namespace in other branches
- 7.5 legacy/lib/InjectedAPI/hookXautoload.php \xautoload_InjectedAPI_hookXautoload::namespaceRoot()
- 7.2 lib/InjectedAPI/hookXautoload.php \xautoload_InjectedAPI_hookXautoload::namespaceRoot()
- 7.4 legacy/lib/InjectedAPI/hookXautoload.php \xautoload_InjectedAPI_hookXautoload::namespaceRoot()
Register an additional namespace for this module. Note: Drupal\<module name>\ is already registered for <module dir>/lib.
Parameters
string $namespace: The namespace
string $psr_0_root_dir: PSR-0 root dir. If $relative is TRUE, this is relative to the current module dir. If $relative is FALSE, this is an absolute path.
boolean $relative: Whether or not the path is relative to the current extension dir.
File
- lib/
InjectedAPI/ hookXautoload.php, line 42
Class
- xautoload_InjectedAPI_hookXautoload
- An instance of this class is passed around to implementations of hook_xautoload(). It acts as a wrapper around the ClassFinder, to register stuff.
Code
function namespaceRoot($namespace, $psr_0_root_dir = NULL, $relative = TRUE) {
$psr_0_root_dir = $this
->processDir($psr_0_root_dir, $relative);
$this->finder
->registerNamespaceRoot($namespace, $psr_0_root_dir);
}