WipeCommand
class WipeCommand extends Command (View source)
Свойства
| ConfirmableTrait | |
| CallsCommands | |
| HasParameters | |
| InteractsWithIO | |
| Macroable |
Свойства
| protected InputInterface | $input | Реализация интерфейса ввода. | from InteractsWithIO |
| protected OutputStyle | $output | Реализация интерфейса вывода. | from InteractsWithIO |
| protected int | $verbosity | Уровень подробности вывода команд по умолчанию. | from InteractsWithIO |
| protected array | $verbosityMap | Сопоставление удобочитаемых уровней подробности с уровнями OutputInterface Symfony. | from InteractsWithIO |
| static protected array | $macros | Зарегистрированные строковые макросы. | from Macroable |
| protected Application | $laravel | Экземпляр приложения Laravel. | from Command |
| protected string | $signature | Имя и подпись командной строки. | from Command |
| protected string | $name | Имя командной строки. | |
| protected string | $description | Описание командной строки. | |
| protected string|null | $help | Текст справки командной строки. | from Command |
| $hidden | Указывает, нужно ли отображать команду в списке команд Artisan. | from Command |
Методы
| Command | resolveCommand(Command|string $command) Разрешить экземпляр консольной команды для данной команды. | from CallsCommands |
| int | call(Command|string $command, array $arguments = []) Вызвать другую консольную команду. | from CallsCommands |
| int | callSilent(Command|string $command, array $arguments = []) Вызвать другую консольную команду без вывода. | from CallsCommands |
| int | runCommand(Command|string $command, array $arguments, OutputInterface $output) Запустить заданную консольную команду. | from CallsCommands |
| ArrayInput | createInputFromArguments(array $arguments) Создать экземпляр ввода из заданных аргументов. | from CallsCommands |
| array | context() Получить весь контекст, переданный команде. | from CallsCommands |
| void | specifyParameters() Указать аргументы и опции команды. | from HasParameters |
| array | getArguments() Получить аргументы консольной команды. | from HasParameters |
| array | getOptions() Получить опции консольной команды. | |
| bool | hasArgument(string|int $name) Определить, присутствует ли данный аргумент. | from InteractsWithIO |
| string|array|null | argument(string|null $key = null) Получить значение аргумента команды. | from InteractsWithIO |
| array | arguments() Получить все аргументы, переданные команде. | from InteractsWithIO |
| bool | hasOption(string $name) Определить, присутствует ли данная опция. | from InteractsWithIO |
| string|array|bool|null | option(string|null $key = null) Получить значение опции команды. | from InteractsWithIO |
| array | options() Получить все опции, переданные команде. | from InteractsWithIO |
| bool | confirm(string $question, bool $default = false) Подтвердить вопрос у пользователя. | from InteractsWithIO |
| mixed | ask(string $question, string|null $default = null) Запросить ввод у пользователя. | from InteractsWithIO |
| mixed | anticipate(string $question, array|callable $choices, string|null $default = null) Запросить у пользователя ввод с автодополнением. | from InteractsWithIO |
| mixed | askWithCompletion(string $question, array|callable $choices, string|null $default = null) Запросить у пользователя ввод с автодополнением. | from InteractsWithIO |
| mixed | secret(string $question, bool $fallback = true) Запросить у пользователя ввод, но скрыть ответ в консоли. | from InteractsWithIO |
| string | choice(string $question, array $choices, string|null $default = null, mixed|null $attempts = null, bool|null $multiple = null) Предложить пользователю один вариант из массива ответов. | from InteractsWithIO |
| void | table(array $headers, Arrayable|array $rows, string $tableStyle = 'default', array $columnStyles = []) Форматировать ввод в текстовую таблицу. | from InteractsWithIO |
| void | info(string $string, int|string|null $verbosity = null) Вывести строку как информацию. | from InteractsWithIO |
| void | line(string $string, string|null $style = null, int|string|null $verbosity = null) Вывести строку в стандартный вывод. | from InteractsWithIO |
| void | comment(string $string, int|string|null $verbosity = null) Вывести строку как комментарий. | from InteractsWithIO |
| void | question(string $string, int|string|null $verbosity = null) Вывести строку как вопрос. | from InteractsWithIO |
| void | error(string $string, int|string|null $verbosity = null) Вывести строку как ошибку. | from InteractsWithIO |
| void | warn(string $string, int|string|null $verbosity = null) Вывести строку как предупреждение. | from InteractsWithIO |
| void | alert(string $string) Вывести строку в окне оповещения. | from InteractsWithIO |
| void | setInput(InputInterface $input)
Установить реализацию интерфейса ввода. | из InteractsWithIO |
| void | setOutput(OutputStyle $output)
Установить реализацию интерфейса вывода. | из InteractsWithIO |
| void | setVerbosity(string|int $level)
Установить уровень подробности. | из InteractsWithIO |
| int | parseVerbosity(string|int|null $level = null)
Получить уровень подробности в терминах уровня OutputInterface Symfony. | из InteractsWithIO |
| OutputStyle | getOutput()
Получить реализацию вывода. | из InteractsWithIO |
| static void | macro(string $name, object|callable $macro)
Зарегистрировать пользовательский макрос. | из Macroable |
| static void | mixin(object $mixin, bool $replace = true)
Смешать другой объект в класс. | из Macroable |
| static bool | hasMacro(string $name)
Проверяет, зарегистрирован ли макрос. | из Macroable |
| static mixed | __callStatic(string $method, array $parameters)
Динамически обрабатывать вызовы класса. | из Macroable |
| mixed | __call(string $method, array $parameters)
Динамически обрабатывать вызовы класса. | из Macroable |
| void | __construct()
Создать новый экземпляр команды консоли. | из Command |
| void | configureUsingFluentDefinition()
Настроить команду консоли с помощью определения fluent. | из Command |
| int | run(InputInterface $input, OutputInterface $output)
Выполнить команду консоли. | из Command |
| mixed | execute(InputInterface $input, OutputInterface $output)
Выполнить команду консоли. | из Command |
| isHidden() {@inheritdoc} | из Command | |
| setHidden($hidden) {@inheritdoc} | из Command | |
| Application | getLaravel()
Получить экземпляр приложения Laravel. | из Command |
| void | setLaravel(Container $laravel)
Установить экземпляр приложения Laravel. | из Command |
| bool | confirmToProceed(string $warning = 'Application In Production!', Closure|bool|null $callback = null)
Подтвердить перед продолжением действия. | из ConfirmableTrait |
| Closure | getDefaultConfirmCallback()
Получить стандартный обратный вызов подтверждения. | из ConfirmableTrait |
| void | handle()
Выполнить команду консоли. | |
| void | dropAllTables(string $database)
Удалить все таблицы базы данных. | |
| void | dropAllViews(string $database)
Удалить все представления базы данных. | |
| void | dropAllTypes(string $database)
Удалить все типы базы данных. |
Подробности
abstract protected Command resolveCommand(Command|string $command)
Разрешить экземпляр команды консоли для заданной команды.
int call(Command|string $command, array $arguments = [])
Вызвать другую команду консоли.
int callSilent(Command|string $command, array $arguments = [])
Вызвать другую команду консоли без отображения вывода.
protected int runCommand(Command|string $command, array $arguments, OutputInterface $output)
Выполнить заданную команду консоли.
protected ArrayInput createInputFromArguments(array $arguments)
Создать экземпляр ввода из заданных аргументов.
protected array context()
Получить весь контекст, переданный команде.
protected void specifyParameters()
Указать аргументы и опции команды.
protected array getArguments()
Получить аргументы команды консоли.
protected array getOptions()
Получить опции команды консоли.
bool hasArgument(string|int $name)
Определить, присутствует ли данный аргумент.
string|array|null argument(string|null $key = null)
Получить значение аргумента команды.
array arguments()
Получить все аргументы, переданные команде.
bool hasOption(string $name)
Определить, присутствует ли данная опция.
string|array|bool|null option(string|null $key = null)
Получить значение опции команды.
array options()
Получить все опции, переданные команде.
bool confirm(string $question, bool $default = false)
Подтвердить вопрос у пользователя.
mixed ask(string $question, string|null $default = null)
Запросить ввод у пользователя.
mixed anticipate(string $question, array|callable $choices, string|null $default = null)
Запросить ввод у пользователя с автодополнением.
mixed askWithCompletion(string $question, array|callable $choices, string|null $default = null)
Запросить ввод у пользователя с автодополнением.
mixed secret(string $question, bool $fallback = true)
Запросить ввод у пользователя, но скрыть ответ в консоли.
string choice(string $question, array $choices, string|null $default = null, mixed|null $attempts = null, bool|null $multiple = null)
Предложить пользователю выбрать один вариант из массива ответов.
void table(array $headers, Arrayable|array $rows, string $tableStyle = 'default', array $columnStyles = [])
Форматировать входные данные в таблицу.
void info(string $string, int|string|null $verbosity = null)
Вывести строку как информационное сообщение.
void line(string $string, string|null $style = null, int|string|null $verbosity = null)
Вывести строку в стандартный вывод.
void comment(string $string, int|string|null $verbosity = null)
Вывести строку как комментарий.
void question(string $string, int|string|null $verbosity = null)
Вывести строку как вопрос.
void error(string $string, int|string|null $verbosity = null)
Вывести строку в качестве сообщения об ошибке.
void warn(string $string, int|string|null $verbosity = null)
Вывести строку в качестве предупреждения.
void alert(string $string)
Вывести строку в всплывающем окне с предупреждением.
void setInput(InputInterface $input)
Установить реализацию интерфейса ввода.
void setOutput(OutputStyle $output)
Установить реализацию интерфейса вывода.
protected void setVerbosity(string|int $level)
Установить уровень подробности.
protected int parseVerbosity(string|int|null $level = null)
Получить уровень подробности в терминах уровня OutputInterface Symfony.
OutputStyle getOutput()
Получить реализацию вывода.
static void macro(string $name, object|callable $macro)
Зарегистрировать пользовательский макрос.
static void mixin(object $mixin, bool $replace = true)
Добавить другой объект в класс.
static bool hasMacro(string $name)
Проверка регистрации макроса.
static mixed __callStatic(string $method, array $parameters)
Динамичная обработка вызовов класса.
mixed __call(string $method, array $parameters)
Динамичная обработка вызовов класса.
void __construct()
Создать новый экземпляр команды консоли.
protected void configureUsingFluentDefinition()
Настроить команду консоли с помощью определения fluent.
int run(InputInterface $input, OutputInterface $output)
Запустить команду консоли.
protected mixed execute(InputInterface $input, OutputInterface $output)
Выполнить команду консоли.
isHidden()
{@inheritdoc}
setHidden($hidden)
{@inheritdoc}
Application getLaravel()
Получить экземпляр приложения Laravel.
void setLaravel(Container $laravel)
Установить экземпляр приложения Laravel.
bool confirmToProceed(string $warning = 'Приложение в разработке!', Closure|bool|null $callback = null)
Подтверждение перед продолжением действия.
Этот метод запрашивает подтверждение только в случае разработки.
protected Closure getDefaultConfirmCallback()
Получить стандартный обработчик подтверждения.
void handle()
Выполнить команду консоли.
protected void dropAllTables(string $database)
Удалить все таблицы базы данных.
protected void dropAllViews(string $database)
Удалить все представления базы данных.
protected void dropAllTypes(string $database)
Удалить все типы данных базы данных.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/6.x/Illuminate/Database/Console/WipeCommand.html