#!/usr/bin/env php
<?php
/**
 * Sample console script.
 *
 * Copy this file to your project (bin/console is recommended), change the paths
 * to app.php and run it by using "php bin/console".
 */

require_once __DIR__.'/../vendor/autoload.php';

$bootstrapFilePath = __DIR__.'/../src/app.php';

set_time_limit(0);

$app = require $bootstrapFilePath;

if (!$app instanceof Silex\Application) {
    throw new LogicException(sprintf('The bootstrap file %s must return an instance of Silex\Application.', $bootstrapFilePath));
}
if (!isset($app['console'])) {
    throw new LogicException('The console service does not exist. Did you forget to register Knp\Provider\ConsoleServiceProvider ?');
}

$console = $app['console'];

$console->run();
