You are here

public static function Github_Autoloader::autoload in Bibliography Module 7.2

Handles autoloading of classes.

Parameters

string $class A class name.:

Return value

boolean Returns true if the class has been loaded

File

modules/CiteProc/Github/Autoloader.php, line 24

Class

Github_Autoloader
Autoloads Github classes

Code

public static function autoload($class) {
  if (0 !== strpos($class, 'Github')) {
    return;
  }
  if (file_exists($file = dirname(__FILE__) . '/../' . str_replace('_', '/', $class) . '.php')) {
    require $file;
  }
}