ClearCommand
class ClearCommand extends Command (View source)
Свойства
| protected Application | $laravel | Экземпляр приложения Laravel. | из Command |
| protected InputInterface | $input | Реализация интерфейса ввода. | из Command |
| protected OutputStyle | $output | Реализация интерфейса вывода. | из Command |
| protected string | $signature | Имя и подпись командной строки. | из Command |
| protected string | $name | Имя командной строки. | |
| protected string | $description | Описание командной строки. | |
| protected int | $verbosity | Уровень подробности вывода команд по умолчанию. | из Command |
| protected array | $verbosityMap | Сопоставление удобочитаемых уровней подробности с уровнями OutputInterface Symfony. | из Command |
| protected CacheManager | $cache | Экземпляр менеджера кэша. |
Методы
| void | __construct(CacheManager $cache) Создать новый экземпляр команды очистки кэша. | |
| void | configureUsingFluentDefinition() Настроить консольную команду с помощью определения fluent. | из Command |
| void | specifyParameters() Указать аргументы и параметры команды. | из Command |
| int | run(InputInterface $input, OutputInterface $output) Выполнить консольную команду. | из Command |
| mixed | execute(InputInterface $input, OutputInterface $output) Выполнить консольную команду. | из Command |
| int | call(string $command, array $arguments = []) Вызвать другую консольную команду. | из Command |
| int | callSilent(string $command, array $arguments = []) Вызвать другую консольную команду без вывода. | из Command |
| bool | hasArgument(string|int $name) Определить, присутствует ли данный аргумент. | из Command |
| string|array | argument(string $key = null) Получить значение аргумента команды. | из Command |
| bool | hasOption(string $name) Определить, присутствует ли данный параметр. | из Command |
| string|array | option(string $key = null) Получить значение параметра команды. | из Command |
| bool | confirm(string $question, bool $default = false) Подтвердить вопрос у пользователя. | из Command |
| string | ask(string $question, string $default = null) Задать вопрос пользователю и получить ответ. | из Command |
| string | anticipate(string $question, array $choices, string $default = null) Задать вопрос пользователю с автодополнением. | из Command |
| string | askWithCompletion(string $question, array $choices, string $default = null) Задать вопрос пользователю с автодополнением. | из Command |
| string | secret(string $question, bool $fallback = true) Задать вопрос пользователю, скрыв ответ в консоли. | из Command |
| string | choice(string $question, array $choices, string $default = null, mixed $attempts = null, bool $multiple = null) Предложить пользователю выбор из массива ответов. | из Command |
| void | table(array $headers, Arrayable|array $rows, string $style = 'default') Отформатировать входные данные в текстовую таблицу. | из Command |
| void | info(string $string, null|int|string $verbosity = null) Вывести строку как информационное сообщение. | из Command |
| void | line(string $string, string $style = null, null|int|string $verbosity = null) Вывести строку в стандартный вывод. | из Command |
| void | comment(string $string, null|int|string $verbosity = null) Вывести строку как комментарий. | из Command |
| void | question(string $string, null|int|string $verbosity = null) Вывести строку как вопрос. | из Command |
| void | error(string $string, null|int|string $verbosity = null) Вывести строку как сообщение об ошибке. | из Command |
| void | warn(string $string, null|int|string $verbosity = null) Вывести строку как предупреждение. | из Command |
| int | parseVerbosity(string|int $level = null) Получить уровень подробности в терминах уровня OutputInterface Symfony. | из Command |
| void | setVerbosity(string|int $level) Установить уровень подробности. | из Command |
| array | getArguments() Получить аргументы консольной команды. | |
| array | getOptions() Получить параметры консольной команды. | |
| OutputInterface | getOutput() Получить реализацию вывода. | из Command |
| Application | getLaravel() Получить экземпляр приложения Laravel. | из Command |
| void | setLaravel(Container $laravel) Установить экземпляр приложения Laravel. | из Command |
| void | handle() Выполнить консольную команду. |
Подробности
void __construct(CacheManager $cache)
Создать новый экземпляр команды очистки кэша.
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 = [])
Вызвать другую команду консоли без вывода.
bool hasArgument(string|int $name)
Определить, существует ли указанный аргумент.
string|array argument(string $key = null)
Получить значение аргумента команды.
bool hasOption(string $name)
Определить, существует ли указанный параметр.
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, null|int|string $verbosity = null)
Вывести строку как информацию.
void line(string $string, string $style = null, null|int|string $verbosity = null)
Вывести строку в стандартный вывод.
void comment(string $string, null|int|string $verbosity = null)
Вывести строку в качестве комментария.
void question(string $string, null|int|string $verbosity = null)
Вывести строку в качестве вопроса.
void error(string $string, null|int|string $verbosity = null)
Вывести строку в качестве ошибки.
void warn(string $string, null|int|string $verbosity = null)
Вывести строку в качестве предупреждения.
protected int parseVerbosity(string|int $level = null)
Получить уровень подробности в терминах уровня OutputInterface Symfony.
protected void setVerbosity(string|int $level)
Установить уровень подробности.
protected array getArguments()
Получить аргументы команды консоли.
protected array getOptions()
Получить параметры команды консоли.
OutputInterface getOutput()
Получить реализацию вывода.
Application getLaravel()
Получить экземпляр приложения Laravel.
void setLaravel(Container $laravel)
Установить экземпляр приложения Laravel.
void handle()
Выполнить команду консоли.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Cache/Console/ClearCommand.html