function _MYMODULE_include in X Autoload 7.3
Same name and namespace in other branches
- 7.5 xautoload.emulate.inc \_MYMODULE_include()
- 7 xautoload.emulate.inc \_MYMODULE_include()
- 7.2 xautoload.emulate.inc \_MYMODULE_include()
- 7.4 xautoload.emulate.inc \_MYMODULE_include()
Register a dedicated class loader only for this module.
You want to rename this function as something like mymodule_include(), and call it any time to initialize xautoloading for a specific module.
File
- ./
xautoload.emulate.inc, line 16 - xautoload.emulate.inc
Code
function _MYMODULE_include() {
static $first_run = TRUE;
if (!$first_run) {
return;
}
$first_run = FALSE;
if (!module_exists('xautoload')) {
spl_autoload_register('_MYMODULE_autoload');
}
// This could be the place for some procedural includes.
// ..
}