Skip to content

Instantly share code, notes, and snippets.

@donquixote
Created November 5, 2012 15:57
Show Gist options
  • Save donquixote/4017962 to your computer and use it in GitHub Desktop.
Save donquixote/4017962 to your computer and use it in GitHub Desktop.
<?php
function taleo_libraries_info() {
return array(
'Taleo' => array(
'name' => 'Taleo PHP Library',
'xautoload' => 'taleo_xautoload',
),
);
}
function taleo_xautoload($api) {
// $api already knows the library path, so all paths are relative to that.
// If you still want absolute paths, you need to path a third argument FALSE.
// See http://drupalcode.org/project/xautoload.git/blob/refs/heads/7.x-2.x:/lib/InjectedAPI/hookXautoload.php
// $api->namespaceRoot('Guzzle', $path . '/vendor/guzzle/guzzle/src', FALSE);
$api->namespaceRoot('Guzzle', 'vendor/guzzle/guzzle/src');
$api->namespaceRoot('Monolog\Handler\StreamHandler', 'vendor/monolog/monolog/src');
$api->namespaceRoot('Monolog\Logger', 'vendor/monolog/monolog/src');
$api->namespaceRoot('Taleo\Main\Taleo', 'src');
}
@donquixote
Copy link
Author

Duh, of course those relative paths need to be without the slash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment