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