davahome / console
Installs: 2 097
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
pkg:composer/davahome/console
Requires
- symfony/console: >=3 <6
README
Provides functionality for symfony console commands
Installation
php composer.phar require davahome/console
Usage
use DavaHome\Console\Command\AbstractCommand; // Enable/Disable commands dynamically public function configure() { $this->setName('example') ->setEnabled(true); } // Ask questions public function interact() { $this->getQuestionHelper()->ask(new Question('What? ')); } // Write to the error output public function execute() { $this->getErrorOutput($output)->writeln('This will be sent directly to STDERR (if supported)'); } // Display progressBars public function execute() { $progressBar = $this->createProgressBar($output); } // Display tables public function execute() { $table = $this->createTable($output); }
use DavaHome\Console\Helper\ProgressBarOptions; // Use constants for defining the format $progressBar->setFormat(ProgressBarOptions::FORMAT_DEBUG_NOMAX);
use DavaHome\Console\Helper\TableOptions; // Use constants for defining the style $progressBar->setFormat(TableOptions::STYLE_COMPACT);