DownCommand
class DownCommand extends Command (View source)
Свойства
| protected Application | $laravel | Экземпляр приложения Laravel. | из Command |
| protected InputInterface | $input | Реализация интерфейса ввода. | из Command |
| protected OutputInterface | $output | Реализация интерфейса вывода. | из Command |
| protected string | $name | Имя команды консоли. | |
| protected string | $description | Описание команды консоли. |
Методы
| void | __construct() Создать новый экземпляр команды консоли. | from Command |
| void | specifyParameters() Указать аргументы и параметры команды. | from Command |
| int | run(InputInterface $input, OutputInterface $output) Выполнить команду консоли. | from Command |
| mixed | execute(InputInterface $input, OutputInterface $output) Выполнить команду консоли. | from Command |
| int | call(string $command, array $arguments = array()) Вызвать другую команду консоли. | from Command |
| int | callSilent(string $command, array $arguments = array()) Вызвать другую команду консоли без вывода. | from Command |
| string|array | argument(string $key = null) Получить значение аргумента команды. | from Command |
| string|array | option(string $key = null) Получить значение параметра команды. | from Command |
| bool | confirm(string $question, bool $default = false) Подтвердить вопрос у пользователя. | from Command |
| string | ask(string $question, string $default = null) Задать вопрос пользователю. | from Command |
| string | askWithCompletion(string $question, array $choices, string $default = null) Задать вопрос пользователю с автодополнением. | from Command |
| string | secret(string $question, bool $fallback = true) Задать вопрос пользователю, скрыв ответ в консоли. | from Command |
| bool | choice(string $question, array $choices, string $default = null, mixed $attempts = null, bool $multiple = null) Предложить пользователю выбор из массива ответов. | from Command |
| void | table(array $headers, array $rows, string $style = 'default') Форматировать входные данные в таблицу. | from Command |
| void | info(string $string) Вывести строку как информацию. | from Command |
| void | line(string $string) Вывести строку в стандартный вывод. | from Command |
| void | comment(string $string) Вывести строку как комментарий. | from Command |
| void | question(string $string) Вывести строку как вопрос. | from Command |
| void | error(string $string) Вывести строку как ошибку. | from Command |
| array | getArguments() Получить аргументы команды консоли. | from Command |
| array | getOptions() Получить параметры команды консоли. | from Command |
| OutputInterface | getOutput() Получить реализацию вывода. | from Command |
| Application | getLaravel() Получить экземпляр приложения Laravel. | from Command |
| void | setLaravel(Application $laravel) Установить экземпляр приложения Laravel. | from Command |
| void | fire() Выполнить команду консоли. |
Подробности
void __construct()
Создать новый экземпляр команды консоли.
protected void specifyParameters()
Указать аргументы и параметры команды.
int run(InputInterface $input, OutputInterface $output)
Выполнить команду консоли.
protected mixed execute(InputInterface $input, OutputInterface $output)
Выполнить консольную команду.
int call(string $command, array $arguments = array())
Вызвать другую консольную команду.
int callSilent(string $command, array $arguments = array())
Вызвать другую консольную команду без вывода.
string|array argument(string $key = null)
Получить значение аргумента команды.
string|array option(string $key = null)
Получить значение опции команды.
bool confirm(string $question, bool $default = false)
Подтвердить вопрос у пользователя.
string ask(string $question, string $default = null)
Запросить ввод у пользователя.
string askWithCompletion(string $question, array $choices, string $default = null)
Запросить ввод у пользователя с автодополнением.
string secret(string $question, bool $fallback = true)
Запросить ввод у пользователя, скрыв ответ в консоли.
bool choice(string $question, array $choices, string $default = null, mixed $attempts = null, bool $multiple = null)
Предложить пользователю один выбор из массива ответов.
void table(array $headers, array $rows, string $style = 'default')
Форматировать ввод в текстовую таблицу.
void info(string $string)
Вывести строку как информацию.
void line(string $string)
Вывести строку как стандартный вывод.
void comment(string $string)
Вывести строку как комментарий.
void question(string $string)
Вывести строку как вопрос.
void error(string $string)
Вывести строку как ошибку.
protected array getArguments()
Получить аргументы консольной команды.
protected array getOptions()
Получить опции консольной команды.
OutputInterface getOutput()
Получить реализацию вывода.
Application getLaravel()
Получить экземпляр приложения Laravel.
void setLaravel(Application $laravel)
Установить экземпляр приложения Laravel.
void fire()
Выполнить консольную команду.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/4.2/Illuminate/Foundation/Console/DownCommand.html