AboutCommand
class AboutCommand extends Command (View source)
Методы
| CallsCommands | |
| ConfiguresPrompts | |
| HasParameters | |
| InteractsWithIO | |
| InteractsWithSignals | |
| PromptsForMissingInput | |
| Macroable |
Свойства
| protected Factory internal | $components | The console components factory. | from InteractsWithIO |
| protected InputInterface | $input | The input interface implementation. | from InteractsWithIO |
| protected OutputStyle | $output | The output interface implementation. | from InteractsWithIO |
| protected int | $verbosity | The default verbosity of output commands. | from InteractsWithIO |
| protected array | $verbosityMap | The mapping between human readable verbosity levels and Symfony's OutputInterface. | from InteractsWithIO |
| protected Signals|null | $signals | The signal registrar instance. | from InteractsWithSignals |
| static protected array | $macros | The registered string macros. | from Macroable |
| protected Application | $laravel | The Laravel application instance. | from Command |
| protected string | $signature | The console command signature. | |
| protected string | $name | The console command name. | from Command |
| protected string | $description | The console command description. | |
| protected string | $help | The console command help text. | from Command |
| $hidden | Indicates whether the command should be shown in the Artisan command list. | from Command | |
| protected bool | $isolated | Indicates whether only one instance of the command can run at any given time. | from Command |
| protected int | $isolatedExitCode | The default exit code for isolated commands. | from Command |
| protected array | $aliases | The console command name aliases. | from Command |
| protected Composer | $composer | The Composer instance. | |
| static protected array | $data | The data to display. | |
| static protected array | $customDataResolvers | The registered callables that add custom data to the command output. |
Методы
| Команда | resolveCommand(Command|string $command) Разрешить экземпляр консольной команды для заданной команды. | из CallsCommands |
| int | call(Command|string $command, array $arguments = []) Вызвать другую консольную команду. | из CallsCommands |
| int | callSilent(Command|string $command, array $arguments = []) Вызвать другую консольную команду без вывода. | из CallsCommands |
| int | callSilently(Command|string $command, array $arguments = []) Вызвать другую консольную команду без вывода. | из CallsCommands |
| int | runCommand(Command|string $command, array $arguments, OutputInterface $output) Выполнить заданную консольную команду. | из CallsCommands |
| ArrayInput | createInputFromArguments(array $arguments) Создать экземпляр ввода из заданных аргументов. | из CallsCommands |
| массив | context() Получить весь контекст, переданный команде. | из CallsCommands |
| void | configurePrompts(InputInterface $input) Настроить отступы подсказок. | из ConfiguresPrompts |
| смешанный | promptUntilValid(Closure $prompt, bool|string $required, Closure|null $validate) Запрашивать у пользователя данные до тех пор, пока обратный вызов проверки не пройдет. | из ConfiguresPrompts |
| ?string | validatePrompt(mixed $value, mixed $rules) Проверить заданное значение подсказки с помощью валидатора. | из ConfiguresPrompts |
| Validator | getPromptValidatorInstance(mixed $field, mixed $value, mixed $rules, array $messages = [], array $attributes = []) Получить экземпляр валидатора, который должен использоваться для проверки подсказок. | из ConfiguresPrompts |
| массив | validationMessages() Получить сообщения об ошибках валидации, которые должны использоваться при проверке подсказок. | из ConfiguresPrompts |
| массив | validationAttributes() Получить атрибуты валидации, которые должны использоваться при проверке подсказок. | из ConfiguresPrompts |
| void | restorePrompts() Восстановить вывод подсказок. | из ConfiguresPrompts |
| void | specifyParameters() Указать аргументы и параметры команды. | из HasParameters |
| массив | getArguments() Получить аргументы консольной команды. | из HasParameters |
| массив | getOptions() Получить параметры консольной команды. | из HasParameters |
| bool | hasArgument(string|int $name) Определить, присутствует ли заданный аргумент. | из InteractsWithIO |
| массив|строка|bool|null | argument(string|null $key = null) Получить значение аргумента команды. | из InteractsWithIO |
| массив | arguments() Получить все переданные команде аргументы. | из InteractsWithIO |
| bool | hasOption(string $name) Определить, присутствует ли заданный параметр. | из InteractsWithIO |
| строка|массив|bool|null | option(string|null $key = null) Получить значение параметра команды. | из InteractsWithIO |
| массив | options() Получить все переданные команде параметры. | из InteractsWithIO |
| bool | confirm(string $question, bool $default = false) Подтвердить вопрос у пользователя. | из InteractsWithIO |
| смешанный | ask(string $question, string|null $default = null) Запросить у пользователя ввод. | из InteractsWithIO |
| смешанный | anticipate(string $question, array|callable $choices, string|null $default = null) Запросить у пользователя ввод с автозаполнением. | из InteractsWithIO |
| смешанный | askWithCompletion(string $question, array|callable $choices, string|null $default = null) Запросить у пользователя ввод с автозаполнением. | из InteractsWithIO |
| смешанный | secret(string $question, bool $fallback = true) Запросить у пользователя ввод, но скрыть ответ в консоли. | из InteractsWithIO |
| string|array | choice(string $question, array $choices, string|int|null $default = null, mixed|null $attempts = null, bool $multiple = false)
Предложите пользователю единственный выбор из массива ответов. | из InteractsWithIO |
| void | table(array $headers, Arrayable|array $rows, TableStyle|string $tableStyle = 'default', array $columnStyles = [])
Форматирование ввода в текстовую таблицу. | из InteractsWithIO |
| mixed|void | withProgressBar(iterable|int $totalSteps, Closure $callback)
Выполнение заданного обратного вызова с одновременным продвижением полосы прогресса. | из 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, int|string|null $verbosity = null)
Вывод строки в окне предупреждения. | из InteractsWithIO |
| $this | newLine(int $count = 1)
Вывод пустой строки. | из 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 |
| Factory | outputComponents()
Получение реализации фабрики компонентов вывода. | из InteractsWithIO |
| trap($signals, $callback) Без описания | из InteractsWithSignals | |
| void | untrap()
Отключение обработчиков сигналов, установленных в обработчике команды. | из InteractsWithSignals |
| void | interact(InputInterface $input, OutputInterface $output)
Взаимодействие с пользователем перед валидацией ввода. | из PromptsForMissingInput |
| void | promptForMissingArguments(InputInterface $input, OutputInterface $output)
Запрос у пользователя отсутствующих аргументов. | из PromptsForMissingInput |
| array | promptForMissingArgumentsUsing()
Запрос отсутствующих аргументов ввода, используя возвращенные вопросы. | из PromptsForMissingInput |
| void | afterPromptingForMissingArguments(InputInterface $input, OutputInterface $output)
Выполнение действий после запроса у пользователя отсутствующих аргументов. | из PromptsForMissingInput |
| bool | didReceiveOptions(InputInterface $input)
Содержит ли ввод какие-либо параметры, отличающиеся от значений по умолчанию? | из PromptsForMissingInput |
| 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 void | flushMacros()
Очистка существующих макросов. | из Macroable |
| static mixed | __callStatic(string $method, array $parameters)
Динамически обрабатывает вызовы класса. | из Macroable |
| mixed | __call(string $method, array $parameters)
Динамически обрабатывает вызовы класса. | из Macroable |
| void | __construct(Composer $composer)
Создаёт новый экземпляр команды. | |
| void | configureUsingFluentDefinition()
Настраивает команду консоли с помощью определения Fluent. | из Command |
| void | configureIsolation()
Настраивает команду консоли для изоляции. | из Command |
| int | run(InputInterface $input, OutputInterface $output)
Выполняет команду консоли. | из Command |
| int | execute(InputInterface $input, OutputInterface $output)
Выполняет команду консоли. | из Command |
| CommandMutex | commandIsolationMutex()
Получает экземпляр мьютекса изоляции команды для команды. | из Command |
| void | fail(Throwable|string|null $exception = null)
Принудительно завершить выполнение команды с ошибкой. | из Command |
| bool | isHidden() {@inheritdoc} | из Command |
| Command | setHidden(bool $hidden = true) {@inheritdoc} | из Command |
| Application | getLaravel()
Получить экземпляр приложения Laravel. | из Command |
| void | setLaravel(Container $laravel)
Установить экземпляр приложения Laravel. | из Command |
| int | handle()
Выполнить команду консоли. | |
| void | display(Collection $data)
Отобразить информацию об приложении. | |
| void | displayDetail(Collection $data)
Отобразить информацию об приложении как представление деталей. | |
| void | displayJson(Collection $data)
Отобразить информацию об приложении в формате JSON. | |
| void | gatherApplicationInformation()
Собрать информацию об приложении. | |
| bool | hasPhpFiles(string $path)
Определить, содержит ли заданный каталог PHP-файлы. | |
| static void | add(string $section, callable|string|array $data, string|null $value = null)
Добавить дополнительные данные в вывод команды "about". | |
| static void | addToSection(string $section, callable|string|array $data, string|null $value = null)
Добавить дополнительные данные в вывод команды "about". | |
| array | sections()
Получить разделы, предоставленные команде. | |
| static | format(mixed $value, Closure|null $console = null, Closure|null $json = null)
Создать функцию форматирования заданного значения для вывода в консоль или формате JSON. | |
| string | toSearchKeyword(string $value)
Отформатировать заданную строку для поиска. | |
| static void | flushState()
Очистить зарегистрированные данные команды "about". |
Подробности
abstract protected Command resolveCommand(Command|string $command)
Разрешить экземпляр команды консоли для заданной команды.
int call(Command|string $command, array $arguments = [])
Вызвать другую команду консоли.
int callSilent(Command|string $command, array $arguments = [])
Вызвать другую команду консоли без вывода.
int callSilently(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 configurePrompts(InputInterface $input)
Настроить отступы подсказок.
protected mixed promptUntilValid(Closure $prompt, bool|string $required, Closure|null $validate)
Запрашивать у пользователя данные, пока не будет выполнено заданное условие проверки.
protected ?string validatePrompt(mixed $value, mixed $rules)
Проверить заданное значение подсказки с помощью валидатора.
protected Validator getPromptValidatorInstance(mixed $field, mixed $value, mixed $rules, array $messages = [], array $attributes = [])
Получить экземпляр валидатора, который должен использоваться для проверки подсказок.
protected array validationMessages()
Получить сообщения об ошибках валидации, которые должны использоваться при проверке подсказок.
protected array validationAttributes()
Получить атрибуты валидации, которые должны использоваться при проверке подсказок.
protected void restorePrompts()
Восстановить вывод подсказок.
protected void specifyParameters()
Указать аргументы и опции команды.
protected array getArguments()
Получить аргументы команды.
protected array getOptions()
Получить опции команды.
bool hasArgument(string|int $name)
Определить, присутствует ли данный аргумент.
array|string|bool|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|int|null $default = null, mixed|null $attempts = null, bool $multiple = false)
Предоставьте пользователю единственный выбор из массива ответов.
void table(array $headers, Arrayable|array $rows, TableStyle|string $tableStyle = 'default', array $columnStyles = [])
Форматирование ввода в текстовую таблицу.
mixed|void withProgressBar(iterable|int $totalSteps, Closure $callback)
Выполнение заданного обратного вызова с одновременным продвижением полосы прогресса.
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, int|string|null $verbosity = null)
Запись строки в информационное окно.
$this newLine(int $count = 1)
Запись пустой строки.
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()
Получение реализации вывода.
Factory outputComponents()
Получение реализации фабрики компонентов вывода.
trap($signals, $callback)
Без описания
void untrap()
| internal |
Отключение обработчиков сигналов, установленных в обработчике команды.
protected void interact(InputInterface $input, OutputInterface $output)
Взаимодействовать с пользователем перед валидацией ввода.
protected void promptForMissingArguments(InputInterface $input, OutputInterface $output)
Запрашивать у пользователя отсутствующие аргументы.
protected array promptForMissingArgumentsUsing()
Запрашивать отсутствующие входные аргументы, используя возвращенные вопросы.
protected void afterPromptingForMissingArguments(InputInterface $input, OutputInterface $output)
Выполнять действия после запроса у пользователя отсутствующих аргументов.
protected bool didReceiveOptions(InputInterface $input)
Указывает, содержит ли входные данные какие-либо параметры, отличающиеся от значений по умолчанию.
static void macro(string $name, object|callable $macro)
Зарегистрировать пользовательскую макрокоманду.
static void mixin(object $mixin, bool $replace = true)
Вмешать другой объект в класс.
static bool hasMacro(string $name)
Проверяет, зарегистрирована ли макрокоманда.
static void flushMacros()
Очистить существующие макрокоманды.
static mixed __callStatic(string $method, array $parameters)
Динамически обрабатывать вызовы класса.
mixed __call(string $method, array $parameters)
Динамически обрабатывать вызовы класса.
void __construct(Composer $composer)
Создать новый экземпляр команды.
protected void configureUsingFluentDefinition()
Настроить команду консоли с помощью определения fluent.
protected void configureIsolation()
Настроить команду консоли для изоляции.
int run(InputInterface $input, OutputInterface $output)
Запустить команду консоли.
protected int execute(InputInterface $input, OutputInterface $output)
Выполнить команду консоли.
protected CommandMutex commandIsolationMutex()
Получить экземпляр мьютекса изоляции команды для команды.
void fail(Throwable|string|null $exception = null)
Принудительно завершить выполнение команды с ошибкой.
bool isHidden()
{@inheritdoc}
Command setHidden(bool $hidden = true)
{@inheritdoc}
Приложение getLaravel()
Получить экземпляр приложения Laravel.
void setLaravel(Контейнер $laravel)
Установить экземпляр приложения Laravel.
int handle()
Выполнить команду консоли.
protected void display(Коллекция $data)
Отобразить информацию об приложении.
protected void displayDetail(Коллекция $data)
Отобразить информацию об приложении как подробный вид.
protected void displayJson(Коллекция $data)
Отобразить информацию об приложении в формате JSON.
protected void gatherApplicationInformation()
Собрать информацию об приложении.
protected bool hasPhpFiles(string $path)
Определить, содержит ли заданный каталог файлы PHP.
static void add(string $section, callable|string|array $data, string|null $value = null)
Добавить дополнительные данные в вывод команды "about".
static protected void addToSection(string $section, callable|string|array $data, string|null $value = null)
Добавить дополнительные данные в вывод команды "about".
protected array sections()
Получить разделы, предоставленные команде.
static format(mixed $value, Closure|null $console = null, Closure|null $json = null)
Материализовать функцию, которая форматирует заданное значение для вывода в консоли или формате JSON.
protected string toSearchKeyword(string $value)
Отформатировать заданную строку для поиска.
static void flushState()
Очистить зарегистрированные данные о команде "about".
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Foundation/Console/AboutCommand.html