Esempio n. 1
0
 public static function doInit()
 {
     self::$prev = self::$start = microtime(true);
 }
Esempio n. 2
0
    {
        $directoryIterator = new RecursiveDirectoryIterator(__DIR__);
        $iterator = new RecursiveIteratorIterator($directoryIterator);
        $dirs = [];
        foreach ($iterator as $file) {
            if ($file->isDir()) {
                $dirs[] = $file->getRealPath();
            }
        }
        $dirs = array_unique($dirs);
        self::$dirs = $dirs;
    }
    public static function load($className)
    {
        $name = $className . '.php';
        foreach (self::$dirs as $dir) {
            $path = $dir . DIRECTORY_SEPARATOR . $name;
            if (file_exists($path)) {
                include $path;
            }
        }
    }
}
AutoLoader::init();
spl_autoload_register(['AutoLoader', 'load']);
date_default_timezone_set("Europe/Copenhagen");
ini_set('memory_limit', '1024M');
ErrorHandler::init();
Database::init();
BenchmarkHelper::init();