PHP Class Symfony\Component\Console\Style\SymfonyStyle

Author: Kevin Bond ([email protected])
Inheritance: extends Symfony\Component\Console\Style\OutputStyle
Datei anzeigen Open project: symfony/symfony Class Usage Examples

Public Methods

Method Description
__construct ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
ask ( $question, $default = null, $validator = null )
askHidden ( $question, $validator = null )
askQuestion ( Symfony\Component\Console\Question\Question $question ) : string
block ( string | array $messages, string | null $type = null, string | null $style = null, string $prefix = ' ', boolean $padding = false ) Formats a message as a block of text.
caution ( $message )
choice ( $question, array $choices, $default = null )
comment ( string | array $message ) Formats a command comment.
confirm ( $question, $default = true )
createProgressBar ( $max )
error ( $message )
listing ( array $elements )
newLine ( $count = 1 )
note ( $message )
progressAdvance ( $step = 1 )
progressFinish ( )
progressStart ( $max )
section ( $message )
success ( $message )
table ( array $headers, array $rows )
text ( $message )
title ( $message )
warning ( $message )
write ( $messages, $newline = false, $type = self::OUTPUT_NORMAL )
writeln ( $messages, $type = self::OUTPUT_NORMAL )

Private Methods

Method Description
autoPrependBlock ( )
autoPrependText ( )
createBlock ( $messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = false )
getProgressBar ( ) : ProgressBar
reduceBuffer ( $messages )

Method Details

__construct() public method

public __construct ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

ask() public method

public ask ( $question, $default = null, $validator = null )

askHidden() public method

public askHidden ( $question, $validator = null )

askQuestion() public method

public askQuestion ( Symfony\Component\Console\Question\Question $question ) : string
$question Symfony\Component\Console\Question\Question
return string

block() public method

Formats a message as a block of text.
public block ( string | array $messages, string | null $type = null, string | null $style = null, string $prefix = ' ', boolean $padding = false )
$messages string | array The message to write in the block
$type string | null The block type (added in [] on first line)
$style string | null The style to apply to the whole block
$prefix string The prefix for the block
$padding boolean Whether to add vertical padding

caution() public method

public caution ( $message )

choice() public method

public choice ( $question, array $choices, $default = null )
$choices array

comment() public method

Formats a command comment.
public comment ( string | array $message )
$message string | array

confirm() public method

public confirm ( $question, $default = true )

createProgressBar() public method

public createProgressBar ( $max )

error() public method

public error ( $message )

listing() public method

public listing ( array $elements )
$elements array

newLine() public method

public newLine ( $count = 1 )

note() public method

public note ( $message )

progressAdvance() public method

public progressAdvance ( $step = 1 )

progressFinish() public method

public progressFinish ( )

progressStart() public method

public progressStart ( $max )

section() public method

public section ( $message )

success() public method

public success ( $message )

table() public method

public table ( array $headers, array $rows )
$headers array
$rows array

text() public method

public text ( $message )

title() public method

public title ( $message )

warning() public method

public warning ( $message )

write() public method

public write ( $messages, $newline = false, $type = self::OUTPUT_NORMAL )

writeln() public method

public writeln ( $messages, $type = self::OUTPUT_NORMAL )