silverstripe-framework/main.php
Damian Mooyman de079c041d API Implement APP object
API Refactor of Session
2017-06-20 16:43:49 +12:00

27 lines
1.2 KiB
PHP

<?php
/************************************************************************************
************************************************************************************
** **
** If you can read this text in your browser then you don't have PHP installed. **
** Please install PHP 5.6.0 or higher **
** **
************************************************************************************
************************************************************************************/
use SilverStripe\Core\AppKernel;
use SilverStripe\Core\HTTPApplication;
use SilverStripe\Core\Startup\ErrorControlChainMiddleware;
use SilverStripe\Core\Startup\OutputMiddleware;
use SilverStripe\Control\HTTPRequest;
require __DIR__ . '/src/includes/autoload.php';
// Default application
$request = HTTPRequest::createFromEnvironment();
$kernel = new AppKernel();
$app = new HTTPApplication($kernel);
$app->addMiddleware(new OutputMiddleware());
$app->addMiddleware(new ErrorControlChainMiddleware($app, $request));
$app->handle($request);