mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
22 lines
551 B
PHP
Executable File
22 lines
551 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';
|
|
$_SERVER['SCRIPT_FILENAME'] = __FILE__;
|
|
chdir(__DIR__);
|
|
|
|
|
|
require __DIR__ . '/src/includes/autoload.php';
|
|
|
|
// Default application
|
|
$request = HTTPRequest::createFromEnvironment();
|
|
$kernel = new AppKernel();
|
|
$app = new HTTPApplication($kernel);
|
|
$app->addMiddleware(new OutputMiddleware());
|
|
$app->handle($request);
|