summaryrefslogtreecommitdiff
path: root/cli
blob: 8d82cc5d6a28b4d633279efdebf1ceab5833c7f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env php
<?php

use Symfony\Component\EventDispatcher\Event;

if (php_sapi_name() !== 'cli') {
    echo 'This script run only from the command line'.PHP_EOL;
    exit(255);
}

try {
    require __DIR__.'/app/common.php';
    $container['dispatcher']->dispatch('app.bootstrap', new Event);
    $container['cli']->run();
} catch (Exception $e) {
    echo $e->getMessage().PHP_EOL;
    exit(255);
}