/** * @desc Generates the autoload cache file by exploring phpboost folders */ public static function generate_classlist() { if (!self::$already_reloaded) { self::$already_reloaded = true; self::$autoload = array(); include_once PATH_TO_ROOT . '/kernel/framework/io/filesystem/FileSystemElement.class.php'; include_once PATH_TO_ROOT . '/kernel/framework/io/filesystem/Folder.class.php'; include_once PATH_TO_ROOT . '/kernel/framework/io/filesystem/File.class.php'; include_once PATH_TO_ROOT . '/kernel/framework/io/IOException.class.php'; include_once PATH_TO_ROOT . '/kernel/framework/util/Path.class.php'; $phpboost_classfile_pattern = '`\\.class\\.php$`'; $paths = array('/', '/kernel/framework/core/lang'); foreach ($paths as $path) { self::add_classes(Path::phpboost_path() . $path, $phpboost_classfile_pattern); } self::add_classes(Path::phpboost_path() . '/kernel/framework/io/db/dbms/Doctrine/', '`\\.php$`'); self::generate_autoload_cache(); } }
/** * Our fallback; only one __autoload per PHP instance * * @param string $class Class name */ function __autoload($class) { ClassLoader::autoload($class); }