function hook_xautoload in X Autoload 7.4
Same name and namespace in other branches
- 7.5 xautoload.api.php \hook_xautoload()
- 7.2 xautoload.api.php \hook_xautoload()
- 7.3 xautoload.api.php \hook_xautoload()
Implements hook_xautoload()
Register additional classes, namespaces, autoload patterns, that are not already registered by default.
Parameters
\xautoload_InjectedAPI_hookXautoload $api: An adapter object that can register stuff into the class loader.
1 function implements hook_xautoload()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- libraries_xautoload in ./
xautoload.module - Implements hook_xautoload on behalf of libraries module
1 invocation of hook_xautoload()
- HookXautoloadOperation::operateOnFinder in lib/
FinderOperation/ HookXautoloadOperation.php
File
- ./
xautoload.api.php, line 28 - Hooks provided by X Autoload.
Code
function hook_xautoload($api) {
// Register a namespace with PSR-0.
$api
->add('Acme\\GardenKit\\', 'shrubbery/lib');
// Register a namespace with PSR-4.
$api
->absolute()
->addPsr4('Acme\\ShrubGardens\\', '/home/karnouffle/php/shrub-gardens/src');
// Scan sites/all/vendor/composer for Composer-generated autoload files, e.g.
// 'sites/all/vendor/composer/autoload_namespaces.php', etc.
$api
->absolute()
->composerDir('sites/all/vendor/composer');
}