function _MYMODULE_include in X Autoload 7
Same name and namespace in other branches
- 7.5 xautoload.emulate.inc \_MYMODULE_include()
- 7.2 xautoload.emulate.inc \_MYMODULE_include()
- 7.3 xautoload.emulate.inc \_MYMODULE_include()
- 7.4 xautoload.emulate.inc \_MYMODULE_include()
Include basic files, and get the autoload to work.
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) {
if (!module_exists('xautoload')) {
spl_autoload_register('_MYMODULE_autoload');
}
// This could be the place for some procedural includes.
// ..
$_first_run = FALSE;
}
}