You are here

function EXAMPLE_foo in X Autoload 7.4

Same name and namespace in other branches
  1. 7.5 xautoload.api.php \EXAMPLE_foo()

Example method showing how to register namespaces from anywhere.

File

./xautoload.api.php, line 11
Hooks provided by X Autoload.

Code

function EXAMPLE_foo() {

  // Register stuff directly to the class finder.
  xautoload()->finder
    ->addPsr4('Aaa\\Bbb\\', 'sites/all/libraries/aaa-bbb/src');

  // Or use an adapter with more powerful methods.
  xautoload()->adapter
    ->composerDir('sites/all/vendor/composer');
}