PHP Класс Platformsh\Cli\Helper\QuestionHelper

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

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

Метод Описание
__construct ( Symfony\Component\Console\Input\InputInterface $input = null, Symfony\Component\Console\Output\OutputInterface $output = null ) QuestionHelper constructor.
askInput ( string $questionText, mixed $default = null ) : string Ask a simple question which requires input.
choose ( array $items, string $text = 'Enter a number to choose an item:', mixed $default = null ) : mixed
confirm ( string $questionText, boolean $default = true ) : boolean Ask the user to confirm an action.
setInput ( Symfony\Component\Console\Input\InputInterface $input )
setOutput ( Symfony\Component\Console\Output\OutputInterface $output )

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

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

QuestionHelper constructor.
public __construct ( Symfony\Component\Console\Input\InputInterface $input = null, Symfony\Component\Console\Output\OutputInterface $output = null )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

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

Ask a simple question which requires input.
public askInput ( string $questionText, mixed $default = null ) : string
$questionText string
$default mixed
Результат string The user's answer.

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

public choose ( array $items, string $text = 'Enter a number to choose an item:', mixed $default = null ) : mixed
$items array An associative array of choices.
$text string Some text to precede the choices.
$default mixed A default (as a key in $items).
Результат mixed The chosen item (as a key in $items).

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

Ask the user to confirm an action.
public confirm ( string $questionText, boolean $default = true ) : boolean
$questionText string
$default boolean
Результат boolean

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