OptimizeCommand
class OptimizeCommand extends Command (View source)
Трейты
| CallsCommands | |
| HasParameters | |
| InteractsWithIO | |
| Macroable |
Свойства
| protected InputInterface | $input | Реализация интерфейса ввода. | from InteractsWithIO |
| protected OutputStyle | $output | Реализация интерфейса вывода. | from InteractsWithIO |
| protected int | $verbosity | Уровень детализации вывода по умолчанию. | from InteractsWithIO |
| protected array | $verbosityMap | Сопоставление удобочитаемых уровней детализации с уровнями Symfony OutputInterface. | 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 |
Методы
| Команда | resolveCommand(Command|string $command)
Разрешить экземпляр консольной команды для данной команды. | из CallsCommands |
| int | call(Command|string $command, array $arguments = [])
Вызвать другую консольную команду. | из CallsCommands |
| int | callSilent(Command|string $command, array $arguments = [])
Вызвать другую консольную команду без отображения сообщений. | из CallsCommands |
| int | runCommand(Command|string $command, array $arguments, OutputInterface $output)
Запустить заданную консольную команду. | из CallsCommands |
| ArrayInput | createInputFromArguments(array $arguments)
Создать экземпляр ввода из заданных аргументов. | из CallsCommands |
| массив | context()
Получить весь контекст, переданный команде. | из CallsCommands |
| void | specifyParameters()
Указать аргументы и параметры команды. | из HasParameters |
| массив | getArguments()
Получить аргументы консольной команды. | из HasParameters |
| массив | getOptions()
Получить параметры консольной команды. | из HasParameters |
| bool | hasArgument(string|int $name)
Определить, присутствует ли данный аргумент. | из InteractsWithIO |
| string|массив|null | argument(string|null $key = null)
Получить значение аргумента команды. | из InteractsWithIO |
| массив | arguments()
Получить все аргументы, переданные команде. | из InteractsWithIO |
| bool | hasOption(string $name)
Определить, присутствует ли данный параметр. | из InteractsWithIO |
| string|массив|bool|null | option(string|null $key = null)
Получить значение параметра команды. | из InteractsWithIO |
| массив | options()
Получить все параметры, переданные команде. | из InteractsWithIO |
| bool | confirm(string $question, bool $default = false)
Подтвердить вопрос у пользователя. | из InteractsWithIO |
| mixed | ask(string $question, string|null $default = null)
Запросить ввод у пользователя. | из InteractsWithIO |
| mixed | anticipate(string $question, array|callable $choices, string|null $default = null)
Запросить ввод у пользователя с автозаполнением. | из InteractsWithIO |
| mixed | askWithCompletion(string $question, array|callable $choices, string|null $default = null)
Запросить ввод у пользователя с автозаполнением. | из InteractsWithIO |
| mixed | secret(string $question, bool $fallback = true)
Запросить ввод у пользователя, но скрыть ответ в консоли. | из InteractsWithIO |
| string|массив | choice(string $question, array $choices, string|null $default = null, mixed|null $attempts = null, bool $multiple = false)
Предложить пользователю выбрать один вариант из массива ответов. | из InteractsWithIO |
| void | table(array $headers, Arrayable|array $rows, string $tableStyle = 'default', array $columnStyles = [])
Форматировать ввод в текстовую таблицу. | из InteractsWithIO |
| void | info(string $string, int|string|null $verbosity = null)
Вывести строку как информацию. | из InteractsWithIO |
| void | line(string $string, string|null $style = null, int|string|null $verbosity = null)
Вывести строку в стандартный вывод. | из InteractsWithIO |
| void | comment(string $string, int|string|null $verbosity = null)
Вывести строку как комментарий. | из InteractsWithIO |
| void | question(string $string, int|string|null $verbosity = null)
Вывести строку как вопрос. | из InteractsWithIO |
| void | error(string $string, int|string|null $verbosity = null)
Вывести строку как ошибку. | из InteractsWithIO |
| void | warn(string $string, int|string|null $verbosity = null)
Вывести строку как предупреждение. | из InteractsWithIO |
| void | alert(string $string)
Вывести строку в информационной панели. | из 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 |
| int | execute(InputInterface $input, OutputInterface $output)
Выполнить команду консоли. | из Command |
| isHidden() {@inheritdoc} | из Command | |
| setHidden(bool $hidden) {@inheritdoc} | из Command | |
| Application | getLaravel()
Получить экземпляр приложения Laravel. | из Command |
| void | setLaravel(Container $laravel)
Установить экземпляр приложения Laravel. | из Command |
| void | handle()
Выполнить команду консоли. |
Details
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|array choice(string $question, array $choices, string|null $default = null, mixed|null $attempts = null, bool $multiple = false)
Предложить пользователю один выбор из массива ответов.
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 int execute(InputInterface $input, OutputInterface $output)
Выполнить команду консоли.
isHidden()
{@inheritdoc}
setHidden(bool $hidden)
{@inheritdoc}
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/7.x/Illuminate/Foundation/Console/OptimizeCommand.html