function adAutoload in Bibliography Module 7.2
3 string references to 'adAutoload'
- biblio_contributor_initial_parse in includes/
biblio.contributors.inc - example.php in lib/
msrc-authortool/ example.php - run.php in lib/
msrc-authortool/ functest/ run.php
File
- lib/
msrc-authortool/ autoload.php, line 3
Code
function adAutoload($classname) {
$ds = DIRECTORY_SEPARATOR;
$classname = ltrim($classname, '\\');
$filename = '';
if ($lnp = strripos($classname, '\\')) {
$namespace = substr($classname, 0, $lnp);
$classname = substr($classname, $lnp + 1);
$filename = str_replace('\\', $ds, $namespace) . $ds;
}
$filename .= str_replace('_', $ds, $classname) . '.php';
$fullpath = __DIR__ . $ds . 'src' . $ds . $filename;
if (is_readable($fullpath)) {
require_once $fullpath;
return;
}
}