public function showHelp($command) { // say description $definition = $this->commands[$command]; $wizard = $this->introducer; $table = new Tools\Table(false); $wizard->say('Command : '); $wizard->say(' name ' . $command); $wizard->say(' wizard ' . $definition['class']); $wizard->say(' description ' . $definition['description']); $wizard->say(); $wizard->say('Arguments :'); foreach ($definition['arguments'] as $arg => $argDefinition) { $table->addRow(array('-' . $arg, $argDefinition)); } if (count($definition['arguments']) == 0) { $table->addRow("This command has no argument(s)"); } $wizard->tabulize($table); $wizard->say(); }
/** * Tabulize the given table * @param \Exedra\Wizard\Tools\Table table */ public function tabulize(Tools\Table $table) { $table->printTable(); }