ShowCommand
class ShowCommand extends DatabaseInspectionCommand (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 name and signature of the console command. | |
| 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 array | $typeMappings | A map of database column types. | from DatabaseInspectionCommand |
| protected Composer | $composer | The Composer instance. | from DatabaseInspectionCommand |
Методы
| Команда | 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 |
| mixed | promptUntilValid(Closure $prompt, bool|string $required, Closure|null $validate)
Запрашивать у пользователя данные до тех пор, пока не будет выполнено заданное условие валидации. | из 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 |
| 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 |
| строка|массив | 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)
Получить уровень подробности в терминах уровня Symfony's OutputInterface. | из 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 = null)
Создать новый экземпляр команды. | из DatabaseInspectionCommand |
| void | configureUsingFluentDefinition()
Настроить команду консоли с помощью определения fluent. | из Command |
| void | configureIsolation()
Настроить команду консоли для изоляции. | из Command |
| int | run(InputInterface $input, OutputInterface $output)
Запустить команду консоли. | из Command |
| int | execute(InputInterface $input, OutputInterface $output)
Выполнить команду консоли. | из Command |
| CommandMutex | commandIsolationMutex()
Получить экземпляр мьютекса изоляции команды для команды. | из Command |
| bool | isHidden() {@inheritdoc} | из Command |
| Command | setHidden(bool $hidden = true) {@inheritdoc} | из Command |
| Application | getLaravel()
Получить экземпляр приложения Laravel. | из Command |
| void | setLaravel(Container $laravel)
Установить экземпляр приложения Laravel. | из Command |
| void | registerTypeMappings(AbstractPlatform $platform)
Зарегистрировать пользовательские сопоставления типов Doctrine для команд проверки баз данных. | из DatabaseInspectionCommand |
| string | getPlatformName(AbstractPlatform $platform, string $database)
Получить удобочитаемое имя платформы для заданной платформы. | из DatabaseInspectionCommand |
| int|null | getTableSize(ConnectionInterface $connection, string $table)
Получить размер таблицы в байтах. | из DatabaseInspectionCommand |
| mixed | getMySQLTableSize(ConnectionInterface $connection, string $table)
Получить размер таблицы MySQL в байтах. | из DatabaseInspectionCommand |
| mixed | getPostgresTableSize(ConnectionInterface $connection, string $table)
Получить размер таблицы Postgres в байтах. | из DatabaseInspectionCommand |
| mixed | getSqliteTableSize(ConnectionInterface $connection, string $table)
Получить размер таблицы SQLite в байтах. | из DatabaseInspectionCommand |
| int|null | getConnectionCount(ConnectionInterface $connection)
Получить количество открытых подключений для базы данных. | из DatabaseInspectionCommand |
| array | getConfigFromDatabase(string $database)
Получить детали конфигурации подключения для заданного подключения. | из DatabaseInspectionCommand |
| bool | ensureDependenciesExist()
Убедиться, что зависимости команд базы данных доступны. | из DatabaseInspectionCommand |
| void | installDependencies()
Установить зависимости команды. | из DatabaseInspectionCommand |
| int | handle(ConnectionResolverInterface $connections)
Выполнить команду консоли. | |
| Collection | tables(ConnectionInterface $connection, AbstractSchemaManager $schema)
Получить информацию о таблицах в базе данных. | |
| Collection | collectViews(ConnectionInterface $connection, AbstractSchemaManager $schema)
Получить информацию о представлениях в базе данных. | |
| void | display(array $data)
Отобразить информацию о базе данных. | |
| void | displayJson(array $data)
Отобразить информацию о базе данных в формате JSON. | |
| void | displayForCli(array $data)
Отобразить информацию о базе данных в формате, подходящем для командной строки. |
Подробности
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 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 = null)
Создание нового экземпляра команды.
protected void configureUsingFluentDefinition()
Настройка команды консоли с помощью определения fluent.
protected void configureIsolation()
Настройка команды консоли для изоляции.
int run(InputInterface $input, OutputInterface $output)
Запуск команды консоли.
protected int execute(InputInterface $input, OutputInterface $output)
Выполнение команды консоли.
protected CommandMutex commandIsolationMutex()
Получение экземпляра мьютекса изоляции команды для команды.
bool isHidden()
{@inheritdoc}
Command setHidden(bool $hidden = true)
{@inheritdoc}
Application getLaravel()
Получение экземпляра приложения Laravel.
void setLaravel(Container $laravel)
Установка экземпляра приложения Laravel.
protected void registerTypeMappings(AbstractPlatform $platform)
Регистрация пользовательских сопоставлений типов Doctrine для команд проверки.
protected string getPlatformName(AbstractPlatform $platform, string $database)
Получить удобочитаемое имя платформы для данной платформы.
protected int|null getTableSize(ConnectionInterface $connection, string $table)
Получить размер таблицы в байтах.
protected mixed getMySQLTableSize(ConnectionInterface $connection, string $table)
Получить размер таблицы MySQL в байтах.
protected mixed getPostgresTableSize(ConnectionInterface $connection, string $table)
Получить размер таблицы Postgres в байтах.
protected mixed getSqliteTableSize(ConnectionInterface $connection, string $table)
Получить размер таблицы SQLite в байтах.
protected int|null getConnectionCount(ConnectionInterface $connection)
Получить количество открытых подключений к базе данных.
protected array getConfigFromDatabase(string $database)
Получить детали конфигурации подключения для заданного подключения.
protected bool ensureDependenciesExist()
Убедиться, что зависимости команд базы данных доступны.
protected void installDependencies()
Установить зависимости команды.
int handle(ConnectionResolverInterface $connections)
Выполнить команду консоли.
protected Collection tables(ConnectionInterface $connection, AbstractSchemaManager $schema)
Получить информацию о таблицах в базе данных.
protected Collection collectViews(ConnectionInterface $connection, AbstractSchemaManager $schema)
Получить информацию о представленнях в базе данных.
protected void display(array $data)
Отобразить информацию о базе данных.
protected void displayJson(array $data)
Отобразить информацию о базе данных в формате JSON.
protected void displayForCli(array $data)
Отобразить информацию о базе данных в формате для командной строки.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Database/Console/ShowCommand.html