2007-07-19 12:40:28 +02:00
|
|
|
<?php
|
2008-02-25 03:10:37 +01:00
|
|
|
|
2017-06-12 08:04:34 +02:00
|
|
|
// CLI specific bootstrapping
|
|
|
|
use SilverStripe\Core\AppKernel;
|
|
|
|
use SilverStripe\Core\HTTPApplication;
|
|
|
|
use SilverStripe\Core\Startup\OutputMiddleware;
|
|
|
|
use SilverStripe\Control\HTTPRequest;
|
2016-08-19 00:51:35 +02:00
|
|
|
|
2017-06-12 08:04:34 +02:00
|
|
|
require __DIR__ . '/src/includes/cli.php';
|
2008-09-30 01:41:50 +02:00
|
|
|
$_SERVER['SCRIPT_FILENAME'] = __FILE__;
|
2017-06-12 08:04:34 +02:00
|
|
|
chdir(__DIR__);
|
2007-07-19 12:40:28 +02:00
|
|
|
|
|
|
|
|
2017-06-12 08:04:34 +02:00
|
|
|
require __DIR__ . '/src/includes/autoload.php';
|
2012-02-12 21:22:11 +01:00
|
|
|
|
2017-06-12 08:04:34 +02:00
|
|
|
// Default application
|
|
|
|
$request = HTTPRequest::createFromEnvironment();
|
|
|
|
$kernel = new AppKernel();
|
|
|
|
$app = new HTTPApplication($kernel);
|
|
|
|
$app->addMiddleware(new OutputMiddleware());
|
|
|
|
$app->handle($request);
|