2007-07-19 10:40:28 +00:00
|
|
|
<?php
|
2012-03-31 20:09:45 +13:00
|
|
|
|
2017-06-07 18:07:33 +12:00
|
|
|
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';
|
|
|
|
|
2017-06-13 14:10:59 +12:00
|
|
|
// Build request and detect flush
|
2017-06-07 18:07:33 +12:00
|
|
|
$request = HTTPRequest::createFromEnvironment();
|
2017-06-13 14:10:59 +12:00
|
|
|
|
|
|
|
// Default application
|
2017-06-15 18:41:44 +12:00
|
|
|
$kernel = new AppKernel();
|
2017-06-07 18:07:33 +12:00
|
|
|
$app = new HTTPApplication($kernel);
|
|
|
|
$app->addMiddleware(new OutputMiddleware());
|
|
|
|
$app->addMiddleware(new ErrorControlChainMiddleware($app, $request));
|
|
|
|
$app->handle($request);
|