2007-07-19 10:40:28 +00:00
|
|
|
<?php
|
2012-03-31 20:09:45 +13:00
|
|
|
|
2017-06-21 17:07:11 +12:00
|
|
|
use SilverStripe\Control\HTTPApplication;
|
2017-06-20 15:34:34 +12:00
|
|
|
use SilverStripe\Control\HTTPRequestBuilder;
|
2017-06-20 16:39:43 +12:00
|
|
|
use SilverStripe\Core\CoreKernel;
|
2017-06-07 18:07:33 +12:00
|
|
|
use SilverStripe\Core\Startup\ErrorControlChainMiddleware;
|
|
|
|
|
|
|
|
require __DIR__ . '/src/includes/autoload.php';
|
|
|
|
|
2017-06-13 14:10:59 +12:00
|
|
|
// Build request and detect flush
|
2017-06-20 15:34:34 +12:00
|
|
|
$request = HTTPRequestBuilder::createFromEnvironment();
|
2017-06-13 14:10:59 +12:00
|
|
|
|
|
|
|
// Default application
|
2017-06-20 16:39:43 +12:00
|
|
|
$kernel = new CoreKernel(BASE_PATH);
|
2017-06-07 18:07:33 +12:00
|
|
|
$app = new HTTPApplication($kernel);
|
2017-06-19 18:07:53 +12:00
|
|
|
$app->addMiddleware(new ErrorControlChainMiddleware($app));
|
2017-06-20 15:34:34 +12:00
|
|
|
$response = $app->handle($request);
|
|
|
|
$response->output();
|