Copied!

Output decorator helpers for the Symfony Style Guide.

CloneableInstantiable
Constants
public Symfony\Component\Console\Style\SymfonyStyle::MAX_LINE_LENGTH = 120
public Symfony\Component\Console\Output\OutputInterface::OUTPUT_NORMAL = 1
public Symfony\Component\Console\Output\OutputInterface::OUTPUT_PLAIN = 4
public Symfony\Component\Console\Output\OutputInterface::OUTPUT_RAW = 2
public Symfony\Component\Console\Output\OutputInterface::VERBOSITY_DEBUG = 256
public Symfony\Component\Console\Output\OutputInterface::VERBOSITY_NORMAL = 32
public Symfony\Component\Console\Output\OutputInterface::VERBOSITY_QUIET = 16
public Symfony\Component\Console\Output\OutputInterface::VERBOSITY_SILENT = 8
public Symfony\Component\Console\Output\OutputInterface::VERBOSITY_VERBOSE = 64
public Symfony\Component\Console\Output\OutputInterface::VERBOSITY_VERY_VERBOSE = 128
Methods
public __construct(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output)
public ask(string $question, ?string $default = NULL, ?callable $validator = NULL) : ?mixed
public askHidden(string $question, ?callable $validator = NULL) : ?mixed
public askQuestion(Symfony\Component\Console\Question\Question $question) : ?mixed
public block(array|string $messages, ?string $type = NULL, ?string $style = NULL, string $prefix = ' ', bool $padding = false, bool $escape = true) : void
 

Formats a message as a block of text.

public caution(array|string $message) : void
public choice(string $question, array $choices, ?mixed $default = NULL, bool $multiSelect = false) : ?mixed
public comment(array|string $message) : void
 

Formats a command comment.

public confirm(string $question, bool $default = true) : bool
public createProgressBar(int $max = 0) : Symfony\Component\Console\Helper\ProgressBar
public createTable() : Symfony\Component\Console\Helper\Table
public definitionList(Symfony\Component\Console\Helper\TableSeparator|array|string $list) : void
 

Formats a list of key/value horizontally.

Each row can be one of:

  • 'A title'
  • ['key' => 'value']
  • new TableSeparator()
public error(array|string $message) : void
public getErrorStyle() : self
 

Returns a new instance which makes use of stderr if available.

public Symfony\Component\Console\Style\OutputStyle::getFormatter() : Symfony\Component\Console\Formatter\OutputFormatterInterface
public Symfony\Component\Console\Style\OutputStyle::getVerbosity() : int
public horizontalTable(array $headers, array $rows) : void
 

Formats a horizontal table.

public info(array|string $message) : void
 

Formats an info message.

public Symfony\Component\Console\Style\OutputStyle::isDebug() : bool
public Symfony\Component\Console\Style\OutputStyle::isDecorated() : bool
public Symfony\Component\Console\Style\OutputStyle::isQuiet() : bool
public Symfony\Component\Console\Style\OutputStyle::isSilent() : bool
public Symfony\Component\Console\Style\OutputStyle::isVerbose() : bool
public Symfony\Component\Console\Style\OutputStyle::isVeryVerbose() : bool
public listing(array $elements) : void
public newLine(int $count = 1) : void
public note(array|string $message) : void
public progressAdvance(int $step = 1) : void
public progressFinish() : void
public progressIterate(iterable $iterable, ?int $max = NULL) : iterable
 
  • see \ProgressBar::iterate()
  • template
  • template
  • param iterable<\TKey,\TValue> $iterable
  • param int|null $max Number of steps to complete the bar (0 if indeterminate), if null it will be inferred from $iterable
  • return iterable<\TKey,\TValue>
public progressStart(int $max = 0) : void
public section(string $message) : void
public Symfony\Component\Console\Style\OutputStyle::setDecorated(bool $decorated) : void
public Symfony\Component\Console\Style\OutputStyle::setFormatter(Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter) : void
public Symfony\Component\Console\Style\OutputStyle::setVerbosity(int $level) : void
public success(array|string $message) : void
public table(array $headers, array $rows) : void
public text(array|string $message) : void
public title(string $message) : void
public warning(array|string $message) : void
public write(Traversable|array|string $messages, bool $newline = false, int $type = 1self::OUTPUT_NORMAL) : void
public writeln(Traversable|array|string $messages, int $type = 1self::OUTPUT_NORMAL) : void
Methods
protected Symfony\Component\Console\Style\OutputStyle::getErrorOutput() : Symfony\Component\Console\Output\OutputInterface
Properties
private Symfony\Component\Console\Output\TrimmedBufferOutput $bufferedOutput
private Symfony\Component\Console\Input\InputInterface $input
private int $lineLength
private Symfony\Component\Console\Output\OutputInterface $output
private Symfony\Component\Console\Helper\ProgressBar $progressBar
private Symfony\Component\Console\Helper\SymfonyQuestionHelper $questionHelper
Methods
private autoPrependBlock() : void
private autoPrependText() : void
private createBlock(iterable $messages, ?string $type = NULL, ?string $style = NULL, string $prefix = ' ', bool $padding = false, bool $escape = false) : array
private getProgressBar() : Symfony\Component\Console\Helper\ProgressBar
private writeBuffer(string $message, bool $newLine, int $type) : void
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration