* @version 0.1.0 * @see http://php.net/manual/en/language.oop5.autoload.php * */ class Autoloader { public static function register() { spl_autoload_register( function($class) { $file = str_replace(['\\', '/'], DIRECTORY_SEPARATOR, $class).'.class.php'; if(substr($file, 0, 5) == 'sven\\') $file = substr($file, 5); if(!class_exists($class) && file_exists($file)) { require $file; return true; } return false; } ); } } Autoloader::register(); ?>