2016-07-03 09:05:44 -07:00
|
|
|
#!/usr/bin/env php
|
|
|
|
<?php
|
|
|
|
|
2016-07-03 20:54:55 -07:00
|
|
|
use Sikofitt\Command\SchemaValidationCommand;
|
2016-07-11 14:56:40 -07:00
|
|
|
use Symfony\Component\{
|
|
|
|
Console\Input\ArgvInput,
|
|
|
|
Console\Input\InputOption,
|
|
|
|
Debug\Debug
|
|
|
|
};
|
|
|
|
|
2016-07-03 20:54:55 -07:00
|
|
|
|
2016-07-03 09:05:44 -07:00
|
|
|
|
|
|
|
set_time_limit(0);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var Composer\Autoload\ClassLoader $loader
|
|
|
|
*/
|
2016-07-03 20:54:55 -07:00
|
|
|
|
|
|
|
require_once __DIR__. '/../vendor/autoload.php';
|
2016-07-03 09:05:44 -07:00
|
|
|
|
|
|
|
$input = new ArgvInput();
|
|
|
|
|
2016-07-11 14:56:40 -07:00
|
|
|
$app = new App();
|
|
|
|
require_once $app->getAppDirectory() . '/providers.php';
|
|
|
|
if($app->getDebug()) {
|
|
|
|
Debug::enable();
|
2016-07-03 09:05:44 -07:00
|
|
|
}
|
2016-07-11 14:56:40 -07:00
|
|
|
$application = $app['console'];
|
|
|
|
$application->getDefinition()->addOption(new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'The Environment name.', 'dev'));
|
|
|
|
$application->setDispatcher($app['dispatcher']);
|
|
|
|
$twigDebugCommand = new Symfony\Bridge\Twig\Command\DebugCommand('twig:debug');
|
|
|
|
$twigDebugCommand->setTwigEnvironment($app['twig']);
|
|
|
|
$twigLintCommand = new \Symfony\Bridge\Twig\Command\LintCommand('twig:lint');
|
|
|
|
$twigLintCommand->setTwigEnvironment($app['twig']);
|
2016-07-03 20:54:55 -07:00
|
|
|
$application->add(new SchemaValidationCommand());
|
2016-07-11 14:56:40 -07:00
|
|
|
$application->add($twigDebugCommand);
|
|
|
|
$application->add($twigLintCommand);
|
|
|
|
$application->add(new \Symfony\CS\Console\Command\FixCommand());
|
2016-07-17 11:05:32 -07:00
|
|
|
$application->add(new Sikofitt\Command\CreatePdfCommand());
|
2016-07-03 09:05:44 -07:00
|
|
|
$application->run($input);
|
2016-07-11 14:56:40 -07:00
|
|
|
|