You are here

function oauth2_server_xautoload in OAuth2 Server 7

Implements hook_xautoload().

Register oauth2-server-php library classes if libraries module is not enabled.

File

./oauth2_server.module, line 66
Provides OAuth2 server functionality.

Code

function oauth2_server_xautoload($api) {
  if (module_exists('libraries')) {
    return;
  }
  $api
    ->setExtensionDir(oauth2_server_get_library_path());
  $api
    ->namespaceRoot('OAuth2', 'src');
}