silverstripe-framework/cli-script.php
Damian Mooyman c66d433977 API Refactor SapphireTest state management into SapphireTestState
API Remove Injector::unregisterAllObjects()
API Remove FakeController
2017-06-20 16:53:39 +12:00

21 lines
619 B
PHP
Executable File

<?php
// CLI specific bootstrapping
use SilverStripe\Core\AppKernel;
use SilverStripe\Core\HTTPApplication;
use SilverStripe\Core\Startup\OutputMiddleware;
use SilverStripe\Control\HTTPRequest;
require __DIR__ . '/src/includes/cli.php';
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->handle($request);