function xautoload_InjectedAPI_hookXautoload::setModule in X Autoload 7.3
Same name and namespace in other branches
- 7.2 lib/InjectedAPI/hookXautoload.php \xautoload_InjectedAPI_hookXautoload::setModule()
Set a module to use as base for relative paths. This is typically called before each invocation of hook_xautoload() on a module. It can also be called by a module or theme that implements hook_xautoload(), to register class loading information on behalf of another module.
Parameters
string $module: Machine name of the module.
File
- lib/
InjectedAPI/ hookXautoload.php, line 183
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 setModule($module) {
$this->extensionDir = drupal_get_path('module', $module);
}