command arg. option use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption;
= $this->getHelper('question'); $question = new ConfirmationQuestion('Continue with this action?', false); if (!$helper->ask($input, $output, $question)) { return; }
= new ChoiceQuestion( 'Please select your favorite color (defaults to red)', array('red', 'blue', 'yellow'), 0 ); $question->setErrorMessage('Color %s is invalid.'); $color = $helper->ask($input, $output, $question); $output->writeln('You have just selected: '.$color);
$formatter->formatSection( 'Adım 1', 'Bu adımla ilgili metin' ); $output->writeln($formattedLine); [Adım 1] Bu adımla ilgili metin . Sf Console: Formatter Helper
$table ->setHeaders(array('ISBN', 'Title', 'Author')) ->setRows(array( array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), )); $table->render();
array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), new TableSeparator(), array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), ) );