Copied!

Output decorator helpers for the Symfony Style Guide.

Cloneable Instantiable
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_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
 

Asks a question.

public askHidden ( string $question , ? callable $validator = NULL ) : ? mixed
 

Asks a question with the user input hidden.

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 )
 

Formats a message as a block of text.

public caution ( array | string $message )
 

Formats a caution admonition.

public choice ( string $question , array $choices , ? mixed $default = NULL ) : ? mixed
 

Asks a choice question.

public comment ( array | string $message )
 

Formats a command comment.

public confirm ( string $question , bool $default = true ) : bool
 

Asks for confirmation.

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 )
 

Formats a list of key/value horizontally.

Each row can be one of:

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

Formats an error result bar.

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 )
 

Formats a horizontal table.

public info ( array | string $message )
 

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 :: isVerbose () : bool
 
public Symfony\Component\Console\Style\OutputStyle :: isVeryVerbose () : bool
 
public listing ( array $elements )
 

Formats a list.

public newLine ( int $count = 1 )
 
public note ( array | string $message )
 

Formats a note admonition.

public progressAdvance ( int $step = 1 )
 

Advances the progress output X steps.

public progressFinish ()
 

Finishes the progress output.

public progressIterate ( iterable $iterable , ? int $max = NULL ) : iterable
 
  • see \ProgressBar::iterate()
public progressStart ( int $max = 0 )
 

Starts the progress output.

public section ( string $message )
 

Formats a section title.

public Symfony\Component\Console\Style\OutputStyle :: setDecorated ( bool $decorated )
 
public Symfony\Component\Console\Style\OutputStyle :: setFormatter ( Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter )
 
public Symfony\Component\Console\Style\OutputStyle :: setVerbosity ( int $level )
 
public success ( array | string $message )
 

Formats a success result bar.

public table ( array $headers , array $rows )
 

Formats a table.

public text ( array | string $message )
 

Formats informational text.

public title ( string $message )
 

Formats a command title.

public warning ( array | string $message )
 

Formats an warning result bar.

public write ( iterable | string $messages , bool $newline = false , int $type = 1 self::OUTPUT_NORMAL)
 
public writeln ( iterable | string $messages , int $type = 1 self::OUTPUT_NORMAL)
 
Methods
protected Symfony\Component\Console\Style\OutputStyle :: getErrorOutput ()
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
© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration