silverstripe-framework/cli-script.php
Damian Mooyman d1d4375c95 API Refactor $flush into HTPPApplication
API Enforce health check in Controller::pushCurrent()
API Better global backup / restore
Updated Director::test() to use new API
2017-06-20 16:53:39 +12:00

20 lines
528 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();
// Default application
$kernel = new AppKernel();
$app = new HTTPApplication($kernel);
$app->addMiddleware(new OutputMiddleware());
$app->handle($request);