mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
c66d433977
API Remove Injector::unregisterAllObjects() API Remove FakeController
21 lines
675 B
PHP
21 lines
675 B
PHP
<?php
|
|
|
|
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';
|
|
|
|
// Build request and detect flush
|
|
$request = HTTPRequest::createFromEnvironment();
|
|
$flush = $request->getVar('flush') || strpos($request->getURL(), 'dev/build') === 0;
|
|
|
|
// Default application
|
|
$kernel = new AppKernel($flush);
|
|
$app = new HTTPApplication($kernel);
|
|
$app->addMiddleware(new OutputMiddleware());
|
|
$app->addMiddleware(new ErrorControlChainMiddleware($app, $request));
|
|
$app->handle($request);
|