You are here

function xautoload_InjectedAPI_hookXautoload::setModule in X Autoload 7.2

Same name and namespace in other branches
  1. 7.3 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 163

Class

xautoload_InjectedAPI_hookXautoload
An instance of this class is passed around to implementations of hook_xautoload().

Code

function setModule($module) {
  $this->extensionDir = drupal_get_path('module', $module);
}