function xautoload_InjectedAPI_hookXautoload::prefixRoot in X Autoload 7.4
Same name and namespace in other branches
- 7.5 legacy/lib/InjectedAPI/hookXautoload.php \xautoload_InjectedAPI_hookXautoload::prefixRoot()
- 7.2 lib/InjectedAPI/hookXautoload.php \xautoload_InjectedAPI_hookXautoload::prefixRoot()
- 7.3 lib/InjectedAPI/hookXautoload.php \xautoload_InjectedAPI_hookXautoload::prefixRoot()
Register an additional prefix for this module. Note: Drupal\<module name>\ is already registered for <module dir>/lib.
Parameters
string $prefix: The prefix.
string $prefix_root_dir: Prefix root dir. If $relative is TRUE, this is relative to the extension 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
- legacy/
lib/ InjectedAPI/ hookXautoload.php, line 51
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 prefixRoot($prefix, $prefix_root_dir = NULL, $relative = TRUE) {
$prefix_root_dir = $this
->processDir($prefix_root_dir, $relative);
$this->finder
->registerPrefixRoot($prefix, $prefix_root_dir);
}