TinkerCommand
class TinkerCommand extends Command (View source)
Свойства
| protected Application | $laravel | Экземпляр приложения Laravel. | from Command |
| protected InputInterface | $input | Реализация интерфейса ввода. | from Command |
| protected OutputStyle | $output | Реализация интерфейса вывода. | from Command |
| protected string | $signature | Имя и сигнатура командной строки. | from Command |
| protected string | $name | Имя команды консоли. | |
| protected string | $description | Описание команды консоли. | |
| protected array | $commandWhitelist | Команды artisan для включения в оболочку tinker. |
Методы
| void | __construct() Создать новый экземпляр команды консоли. | from Command |
| void | configureUsingFluentDefinition() Настроить команду консоли с помощью определения fluent. | 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 = []) Вызвать другую команду консоли. | from Command |
| int | callSilent(string $command, array $arguments = []) Вызвать другую команду консоли без вывода. | 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 | anticipate(string $question, array $choices, 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 |
| string | choice(string $question, array $choices, string $default = null, mixed $attempts = null, bool $multiple = null) Предложить пользователю выбрать один вариант из списка. | from Command |
| void | table(array $headers, Arrayable|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 |
| void | warn(string $string) Вывести строку как предупреждение. | from Command |
| array | getArguments() Получить аргументы команды консоли. | |
| array | getOptions() Получить параметры команды консоли. | from Command |
| OutputInterface | getOutput() Получить реализацию вывода. | from Command |
| Application | getLaravel() Получить экземпляр приложения Laravel. | from Command |
| void | setLaravel(Application $laravel) Установить экземпляр приложения Laravel. | from Command |
| void | fire() Выполнить команду консоли. | |
| array | getCommands() Получить команды artisan для передачи в PsySH. | |
| array | getCasters() Получить массив адаптеров Laravel. |
Подробности
void __construct()
Создать новый экземпляр команды консоли.
protected void configureUsingFluentDefinition()
Настроить команду консоли с помощью определения fluent.
protected void specifyParameters()
Указать аргументы и параметры команды.
int run(InputInterface $input, OutputInterface $output)
Запустить консольную команду.
protected mixed execute(InputInterface $input, OutputInterface $output)
Выполнить консольную команду.
int call(string $command, array $arguments = [])
Вызвать другую консольную команду.
int callSilent(string $command, array $arguments = [])
Вызвать другую консольную команду без вывода.
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 anticipate(string $question, array $choices, string $default = null)
Задать вопрос пользователю с автодополнением.
string askWithCompletion(string $question, array $choices, string $default = null)
Задать вопрос пользователю с автодополнением.
string secret(string $question, bool $fallback = true)
Задать вопрос пользователю, скрывая ответ в консоли.
string choice(string $question, array $choices, string $default = null, mixed $attempts = null, bool $multiple = null)
Предложить пользователю один вариант из списка ответов.
void table(array $headers, Arrayable|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)
Вывести строку как ошибку.
void warn(string $string)
Вывести строку как предупреждение.
protected array getArguments()
Получить аргументы консольной команды.
protected array getOptions()
Получить опции консольной команды.
OutputInterface getOutput()
Получить реализацию вывода.
Приложение getLaravel()
Получить экземпляр приложения Laravel.
void setLaravel(Приложение $laravel)
Установить экземпляр приложения Laravel.
void fire()
Выполнить консольную команду.
protected array getCommands()
Получить команды Artisan, которые будут переданы в PsySH.
protected array getCasters()
Получить массив адаптеров Laravel.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Foundation/Console/TinkerCommand.html