function _xautoload_register in X Autoload 7.3
Same name and namespace in other branches
- 7.5 xautoload.early.lib.inc \_xautoload_register()
- 7.2 xautoload.module \_xautoload_register()
- 7.4 xautoload.early.lib.inc \_xautoload_register()
Create and register the xautoload class loader. Register the xautoload prefix, but don't register any Drupal-specific stuff yet.
1 call to _xautoload_register()
File
- ./
xautoload.early.inc, line 58
Code
function _xautoload_register() {
// Check that this runs only once.
static $_first_run = TRUE;
if (!$_first_run) {
return;
}
$_first_run = FALSE;
// Register a temporary loader.
spl_autoload_register('_xautoload_autoload_temp');
// This one class needs to be loaded manually.
// Just believe me on that one.
_xautoload_autoload_temp('xautoload_InjectedAPI_findFile');
// Register the "real" class loader.
xautoload('loaderManager')
->register(NULL);
// Register the xautoload_ prefix.
xautoload('finder')
->registerPrefixDeep('xautoload', XAUTOLOAD_LIB_DIR);
// Unregister our temporary loader.
spl_autoload_unregister('_xautoload_autoload_temp');
}