php-spark/plugins/com.noccy.pdo.shell/PdoShellCommand.php

30 lines
767 B
PHP
Raw Normal View History

2021-12-16 01:39:52 +00:00
<?php
namespace SparkPlug\Com\Noccy\Pdo\Shell;
use Spark\Commands\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Helper\TableSeparator;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class PdoShellCommand extends Command {
protected function configure() {
$this->setName("pdo:shell");
$this->setDescription("Launch an interactive PDO shell");
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$shell = new Shell\PdoShell($output);
$shell->run();
return Command::SUCCESS;
}
}