forked from thelia/thelia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Thelia
executable file
·21 lines (17 loc) · 706 Bytes
/
Thelia
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env php
<?php
if (php_sapi_name() != 'cli') {
throw new \Exception('this script can only be launched with cli sapi');
}
set_time_limit(0);
require __DIR__ . '/core/bootstrap.php';
use Thelia\Core\Thelia;
use Thelia\Core\Application;
use Thelia\Command\Output\TheliaConsoleOutput;
use Symfony\Component\Console\Input\ArgvInput;
$input = new ArgvInput();
$env = $input->getParameterOption(array('--env', '-e'), getenv('THELIA_ENV') ?: 'dev');
$debug = getenv('THELIA_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod';
$thelia = new Thelia($env, $debug);
$application = new Application($thelia);
$application->run($input, new TheliaConsoleOutput());