if (in_array($token[0], array(T_CLASS, T_INTERFACE))) { $classes[] = $tokens[$key+2][1]; } } return $classes; */ preg_match_all('{^\\s*(class|interface)\\s+(.*?)(\\s|$)}im', $source, $matches, PREG_PATTERN_ORDER); //Lms_Debug::debug(print_r($matches, 1)); return $matches[2]; } public static function realPath($relativeFilename) { // Check for absolute path if (realpath($relativeFilename) == $relativeFilename) { return $relativeFilename; } // Otherwise, treat as relative path $paths = explode(PATH_SEPARATOR, get_include_path()); foreach ($paths as $path) { $path = str_replace('\\', '/', $path); $path = rtrim($path, '/') . '/'; $fullpath = realpath($path . $relativeFilename); if ($fullpath) { return $fullpath; } } return false; } } PHP_Autoload::register(array("Lms_NameScheme_Autoload", "classAutoloader"));
function __autoload($c) { PHP_Autoload::autoload($c); }