Added PDO shell plugin
This commit is contained in:
29
plugins/com.noccy.pdo.shell/PdoShellCommand.php
Normal file
29
plugins/com.noccy.pdo.shell/PdoShellCommand.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?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;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user