/** * simple autoload function * returns true if the class was loaded, otherwise false * * @param string $classname * @return boolean */ public static function autoload($classname) { if (class_exists($classname, false)) { return false; } if (!self::$path) { self::$path = dirname(__FILE__); } $class = self::$path . DIRECTORY_SEPARATOR . str_replace('_', DIRECTORY_SEPARATOR, $classname) . '.php'; if (!file_exists($class)) { return false; } require_once $class; return true; }