// The autloader isn't initialized yet, so load the file manually. require BASEPATH . 'Autoloader/Autoloader.php'; require APPPATH . 'config/AutoloadConfig.php'; // The Autoloader class only handles namespaces // and "legacy" support. $loader = \App\Config\Services::autoloader(); $loader->initialize(new App\Config\AutoloadConfig()); // The register function will prepend // the psr4 loader. $loader->register(); /* * ------------------------------------------------------ * Set custom exception handling * ------------------------------------------------------ */ \App\Config\Services::exceptions(true)->initialize(); //-------------------------------------------------------------------- // Start the Benchmark //-------------------------------------------------------------------- $benchmark = \App\Config\Services::timer(true); $benchmark->start('total_execution'); //-------------------------------------------------------------------- // CSRF Protection //-------------------------------------------------------------------- $config = new \App\Config\AppConfig(); if ($config->CSRFProtection === true && !is_cli()) { $security = \App\Config\Services::security($config); $security->CSRFVerify(); } //-------------------------------------------------------------------- // Get our Request and Response objects