35 lines
853 B
PHP
Executable File
35 lines
853 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
|
|
use Symfony\Component\Console\Input\ArgvInput;
|
|
use Symfony\Component\Debug\Debug;
|
|
use Sikofitt\Pushbullet\Console\Application;
|
|
use Symfony\Component\Console\Output\ConsoleOutput;
|
|
|
|
set_time_limit(0);
|
|
|
|
/**
|
|
* @var Composer\Autoload\ClassLoader $loader
|
|
*/
|
|
$loader = require __DIR__ . '/../vendor/autoload.php';
|
|
|
|
$input = new ArgvInput();
|
|
$output = new ConsoleOutput();
|
|
|
|
$env = $input->getParameterOption(['--env', '-e'],
|
|
getenv('PHP_ENV') ?: 'dev');
|
|
$debug = getenv('PHP_DEBUG') !== '0' && !$input->hasParameterOption([
|
|
'--no-debug',
|
|
'',
|
|
]) && $env !== 'prod';
|
|
|
|
if ($debug) {
|
|
Debug::enable();
|
|
}
|
|
|
|
$application = new Application();
|
|
$application->add(new \Symfony\Component\Console\Command\HelpCommand());
|
|
$application->add(new \Symfony\Component\Console\Command\ListCommand());
|
|
$application->run($input, $output);
|