| 1 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/*
|
|
|
4 |
* This file is part of the symfony package.
|
|
|
5 |
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
|
|
|
6 |
*
|
|
|
7 |
* For the full copyright and license information, please view the LICENSE
|
|
|
8 |
* file that was distributed with this source code.
|
|
|
9 |
*/
|
|
|
10 |
|
|
|
11 |
require_once(dirname(__FILE__).'/../autoload/sfCoreAutoload.class.php');
|
|
|
12 |
sfCoreAutoload::register();
|
|
|
13 |
|
|
|
14 |
try
|
|
|
15 |
{
|
|
|
16 |
$dispatcher = new sfEventDispatcher();
|
|
|
17 |
$logger = new sfCommandLogger($dispatcher);
|
|
|
18 |
|
|
|
19 |
$application = new sfSymfonyCommandApplication($dispatcher, null, array('symfony_lib_dir' => realpath(dirname(__FILE__).'/..')));
|
|
|
20 |
$statusCode = $application->run();
|
|
|
21 |
}
|
|
|
22 |
catch (Exception $e)
|
|
|
23 |
{
|
|
|
24 |
if (!isset($application))
|
|
|
25 |
{
|
|
|
26 |
throw $e;
|
|
|
27 |
}
|
|
|
28 |
|
|
|
29 |
$application->renderException($e);
|
|
|
30 |
$statusCode = $e->getCode();
|
|
|
31 |
|
|
|
32 |
exit(is_numeric($statusCode) && $statusCode ? $statusCode : 1);
|
|
|
33 |
}
|
|
|
34 |
|
|
|
35 |
exit(is_numeric($statusCode) ? $statusCode : 0);
|