PHP Класс Gush\Helper\StyleHelper

Наследование: extends Symfony\Component\Console\Helper\Helper, implements Gush\Helper\OutputAwareInterface, implements Symfony\Component\Console\Input\InputAwareInterface, implements Symfony\Component\Console\Style\StyleInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Symfony\Component\Console\Helper\QuestionHelper $questionHelper )
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 ( $message )
confirm ( $question, $default = true )
createProgressBar ( $max )
detailsTable ( array $rows )
error ( $message )
getName ( )
getStyle ( ) : SymfonyStyle
getVerbosity ( )
isDecorated ( )
listing ( array $elements )
newLine ( $count = 1 )
note ( $message )
numberedChoice ( string $question, array $choices, string | integer | null $default = null ) : string | integer | null NumberedChoice works the same as a normal choice but prompts for a numbered list of options.
progressAdvance ( $step = 1 )
progressFinish ( )
progressStart ( $max )
section ( $message )
setDecorated ( $decorated )
setInput ( Symfony\Component\Console\Input\InputInterface $input )
setOutput ( Symfony\Component\Console\Output\OutputInterface $output )
setVerbosity ( $level )
success ( $message )
table ( array $headers, array $rows )
text ( $message )
title ( $message )
warning ( $message )
write ( $messages, $newline = false, $type = SymfonyStyle::OUTPUT_NORMAL )
writeln ( $messages, $type = SymfonyStyle::OUTPUT_NORMAL )

Описание методов

__construct() публичный Метод

public __construct ( Symfony\Component\Console\Helper\QuestionHelper $questionHelper )
$questionHelper Symfony\Component\Console\Helper\QuestionHelper

ask() публичный Метод

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

askHidden() публичный Метод

public askHidden ( $question, $validator = null )

askQuestion() публичный Метод

public askQuestion ( Symfony\Component\Console\Question\Question $question ) : string
$question Symfony\Component\Console\Question\Question
Результат string

block() публичный Метод

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 caution ( $message )

choice() публичный Метод

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

comment() публичный Метод

public comment ( $message )

confirm() публичный Метод

public confirm ( $question, $default = true )

createProgressBar() публичный Метод

public createProgressBar ( $max )

detailsTable() публичный Метод

public detailsTable ( array $rows )
$rows array

error() публичный Метод

public error ( $message )

getName() публичный Метод

public getName ( )

getStyle() публичный Метод

public getStyle ( ) : SymfonyStyle
Результат Symfony\Component\Console\Style\SymfonyStyle

getVerbosity() публичный Метод

public getVerbosity ( )

isDecorated() публичный Метод

public isDecorated ( )

listing() публичный Метод

public listing ( array $elements )
$elements array

newLine() публичный Метод

public newLine ( $count = 1 )

note() публичный Метод

public note ( $message )

numberedChoice() публичный Метод

$choices: * key0: Label1 * key1: Label2 * key2: Label3 Shows: * [0]: Label1 * [1]: Label2 * [2]: Label3 When option 0 is selected key0 is returned (instead of Label1).
public numberedChoice ( string $question, array $choices, string | integer | null $default = null ) : string | integer | null
$question string
$choices array
$default string | integer | null Default selection (by key)
Результат string | integer | null

progressAdvance() публичный Метод

public progressAdvance ( $step = 1 )

progressFinish() публичный Метод

public progressFinish ( )

progressStart() публичный Метод

public progressStart ( $max )

section() публичный Метод

public section ( $message )

setDecorated() публичный Метод

public setDecorated ( $decorated )

setInput() публичный Метод

public setInput ( Symfony\Component\Console\Input\InputInterface $input )
$input Symfony\Component\Console\Input\InputInterface

setOutput() публичный Метод

public setOutput ( Symfony\Component\Console\Output\OutputInterface $output )
$output Symfony\Component\Console\Output\OutputInterface

setVerbosity() публичный Метод

public setVerbosity ( $level )

success() публичный Метод

public success ( $message )

table() публичный Метод

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

text() публичный Метод

public text ( $message )

title() публичный Метод

public title ( $message )

warning() публичный Метод

public warning ( $message )

write() публичный Метод

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

writeln() публичный Метод

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