Spec-Zone.ru › Symfony 4.1

SymfonyQuestionHelper

class SymfonyQuestionHelper extends QuestionHelper

Помощник по вопросам, соответствующий стилю Symfony.

Свойства

protected $helperSet из Helper

Методы

setHelperSet(HelperSet $helperSet = null)

Устанавливает набор помощников, связанных с этим помощником.

из Helper
HelperSet getHelperSet()

Получает набор помощников, связанных с этим помощником.

из Helper
static int strlen(string $string)

Возвращает длину строки, используя mb_strwidth, если она доступна.

из Helper
static string substr(string $string, int $from, int|null $length = null)

Возвращает подстроку строки, используя mb_substr, если она доступна.

из Helper
static formatTime($secs) из Helper
static formatMemory($memory) из Helper
static strlenWithoutDecoration(OutputFormatterInterface $formatter, $string) из Helper
static removeDecoration(OutputFormatterInterface $formatter, $string) из Helper
mixed ask(InputInterface $input, OutputInterface $output, Question $question)

Задает вопрос пользователю.

из QuestionHelper
string getName()

Возвращает каноническое имя этого помощника.

из QuestionHelper
static disableStty()

Запрещает использование stty.

из QuestionHelper
writePrompt(OutputInterface $output, Question $question)

Выводит приглашение к вопросу.

writeError(OutputInterface $output, Exception $error)

Выводит сообщение об ошибке.

Подробности

setHelperSet(HelperSet $helperSet = null)

Устанавливает набор помощников, связанных с этим помощником.

Параметры

HelperSet $helperSet

HelperSet getHelperSet()

Получает набор помощников, связанных с этим помощником.

Значение возврата

HelperSet Экземпляр HelperSet

static int strlen(string $string)

Возвращает длину строки, используя mb_strwidth, если она доступна.

Параметры

string $string Строка для проверки длины

Значение возврата

int Длина строки

static string substr(string $string, int $from, int|null $length = null)

Возвращает подстроку строки, используя mb_substr, если она доступна.

Параметры

string $string Строка для выделения подстроки
int $from Начальный смещение
int|null $length Длина для чтения

Значение возврата

string Подстрока

static formatTime($secs)

Параметры

$secs

static formatMemory($memory)

Параметры

$memory

static strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)

Параметры

OutputFormatterInterface $formatter
$string

static removeDecoration(OutputFormatterInterface $formatter, $string)

Параметры

OutputFormatterInterface $formatter
$string

mixed ask(InputInterface $input, OutputInterface $output, Question $question)

Задает вопрос пользователю.

Параметры

InputInterface $input
OutputInterface $output
Question $question

Значение возврата

mixed Ответ пользователя

Исключения

RuntimeException Если в потоке ввода нет данных для чтения

string getName()

Возвращает каноническое имя этого помощника.

Значение возврата

string Каноническое имя

static disableStty()

Запрещает использование stty.

protected writePrompt(OutputInterface $output, Question $question)

Выводит приглашение к вопросу.

Параметры

OutputInterface $output
Question $question

protected writeError(OutputInterface $output, Exception $error)

Выводит сообщение об ошибке.

Параметры

OutputInterface $output
Exception $error

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Console/Helper/SymfonyQuestionHelper.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API