Spec-Zone.ru › Laravel 9

InstallCommand

class InstallCommand extends Command (View source)

Трейты

CallsCommands
HasParameters
InteractsWithIO
InteractsWithSignals
PromptsForMissingInput
Macroable

Свойства

protected Factory internal $components

Фабрика компонентов консоли.

from InteractsWithIO
protected InputInterface $input

Реализация интерфейса ввода.

from InteractsWithIO
protected OutputStyle $output

Реализация интерфейса вывода.

from InteractsWithIO
protected int $verbosity

Уровень подробности вывода команд по умолчанию.

from InteractsWithIO
protected array $verbosityMap

Сопоставление уровней подробности (читаемых человеком) и Symfony's OutputInterface.

from InteractsWithIO
protected Signals|null $signals

Экземпляр регистратора сигналов.

from InteractsWithSignals
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 $help

Текст справки по команде консоли.

from Command
protected bool $hidden

Указывает, должна ли команда отображаться в списке команд Artisan.

from Command
protected MigrationRepositoryInterface $repository

Экземпляр репозитория.

Методы

Команда 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 specifyParameters()

Указать аргументы и параметры команды.

из HasParameters
массив getArguments()

Получить аргументы консольной команды.

из HasParameters
массив getOptions()

Получить параметры консольной команды.

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)

Получить уровень подробности с точки зрения уровня OutputInterface Symfony.

из InteractsWithIO
OutputStyle getOutput()

Получить реализацию вывода.

из InteractsWithIO
void trap(iterable<array-key,int>|int $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(MigrationRepositoryInterface $repository)

Создать новый экземпляр команды установки миграции.

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
Приложение getLaravel()

Получить экземпляр приложения Laravel.

из Команды
void setLaravel(Контейнер $laravel)

Установить экземпляр приложения Laravel.

из Команды
void handle()

Выполнить консольную команду.

Подробности

abstract protected Команда resolveCommand(Команда|строка $command)

Разрешить экземпляр консольной команды для заданной команды.

Параметры

Команда|строка $command

Значение результата

Команда

int call(Команда|строка $command, массив $arguments = [])

Вызвать другую консольную команду.

Параметры

Команда|строка $command
массив $arguments

Значение результата

int

int callSilent(Команда|строка $command, массив $arguments = [])

Вызвать другую консольную команду без вывода.

Параметры

Команда|строка $command
массив $arguments

Значение результата

int

int callSilently(Команда|строка $command, массив $arguments = [])

Вызвать другую консольную команду без вывода.

Параметры

Команда|строка $command
массив $arguments

Значение результата

int

protected int runCommand(Команда|строка $command, массив $arguments, OutputInterface $output)

Запустить заданную консольную команду.

Параметры

Команда|строка $command
массив $arguments
OutputInterface $output

Значение результата

int

protected ArrayInput createInputFromArguments(массив $arguments)

Создать экземпляр ввода из заданных аргументов.

Параметры

массив $arguments

Значение результата

ArrayInput

protected массив context()

Получить весь контекст, переданный команде.

Значение результата

массив

protected void specifyParameters()

Указать аргументы и параметры команды.

Значение результата

void

protected массив getArguments()

Получить аргументы консольной команды.

Значение результата

массив

protected массив getOptions()

Получить параметры консольной команды.

Значение результата

массив

bool hasArgument(строка|int $name)

Определить, присутствует ли заданный аргумент.

Параметры

строка|int $name

Значение результата

bool

массив|строка|bool|null argument(строка|null $key = null)

Получить значение аргумента команды.

Параметры

строка|null $key

Значение результата

массив|строка|bool|null

массив arguments()

Получить все аргументы, переданные команде.

Значение результата

массив

bool hasOption(строка $name)

Определить, присутствует ли заданный параметр.

Параметры

строка $name

Значение результата

bool

строка|массив|bool|null option(строка|null $key = null)

Получить значение параметра команды.

Параметры

строка|null $key

Значение результата

строка|массив|bool|null

массив options()

Получить все параметры, переданные команде.

Значение результата

массив

bool confirm(строка $question, bool $default = false)

Подтвердить вопрос у пользователя.

Параметры

строка $question
bool $default

Значение результата

bool

смешанный ask(строка $question, строка|null $default = null)

Запросить у пользователя ввод.

Параметры

строка $question
строка|null $default

Значение результата

смешанный

смешанный anticipate(строка $question, массив|вызов $choices, строка|null $default = null)

Запросить у пользователя ввод с автозаполнением.

Параметры

строка $question
массив|вызов $choices
строка|null $default

Значение результата

смешанный

смешанный askWithCompletion(строка $question, массив|вызов $choices, строка|null $default = null)

Запросить у пользователя ввод с автозаполнением.

Параметры

строка $question
массив|вызов $choices
строка|null $default

Значение результата

смешанный
END_OF_DOCUMENT_MARKER

mixed secret(string $question, bool $fallback = true)

Запросить у пользователя ввод, но скрыть ответ от консоли.

Parameters

string $question
bool $fallback

Return Value

mixed

string|array choice(string $question, array $choices, string|int|null $default = null, mixed|null $attempts = null, bool $multiple = false)

Предоставить пользователю один выбор из массива ответов.

Parameters

string $question
array $choices
string|int|null $default
mixed|null $attempts
bool $multiple

Return Value

string|array

void table(array $headers, Arrayable|array $rows, TableStyle|string $tableStyle = 'default', array $columnStyles = [])

Форматировать ввод в текстовую таблицу.

Parameters

array $headers
Arrayable|array $rows
TableStyle|string $tableStyle
array $columnStyles

Return Value

void

mixed|void withProgressBar(iterable|int $totalSteps, Closure $callback)

Выполнить заданный обратный вызов, продвигая полосу прогресса.

Parameters

iterable|int $totalSteps
Closure $callback

Return Value

mixed|void

void info(string $string, int|string|null $verbosity = null)

Вывести строку в качестве информации.

Parameters

string $string
int|string|null $verbosity

Return Value

void

void line(string $string, string|null $style = null, int|string|null $verbosity = null)

Вывести строку в стандартный вывод.

Parameters

string $string
string|null $style
int|string|null $verbosity

Return Value

void

void comment(string $string, int|string|null $verbosity = null)

Вывести строку в виде комментария.

Parameters

string $string
int|string|null $verbosity

Return Value

void

void question(string $string, int|string|null $verbosity = null)

Вывести строку в виде вопроса.

Parameters

string $string
int|string|null $verbosity

Return Value

void

void error(string $string, int|string|null $verbosity = null)

Вывести строку в виде ошибки.

Parameters

string $string
int|string|null $verbosity

Return Value

void

void warn(string $string, int|string|null $verbosity = null)

Вывести строку в виде предупреждения.

Parameters

string $string
int|string|null $verbosity

Return Value

void

void alert(string $string, int|string|null $verbosity = null)

Вывести строку в всплывающем окне.

Parameters

string $string
int|string|null $verbosity

Return Value

void

$this newLine(int $count = 1)

Вставить пустую строку.

Parameters

int $count

Return Value

$this

void setInput(InputInterface $input)

Установить реализацию интерфейса ввода.

Parameters

InputInterface $input

Return Value

void

void setOutput(OutputStyle $output)

Установить реализацию интерфейса вывода.

Parameters

OutputStyle $output

Return Value

void

protected void setVerbosity(string|int $level)

Установить уровень подробности.

Parameters

string|int $level

Return Value

void

protected int parseVerbosity(string|int|null $level = null)

Получить уровень подробности в терминах уровня OutputInterface Symfony.

Parameters

string|int|null $level

Return Value

int

OutputStyle getOutput()

Получить реализацию вывода.

Return Value

OutputStyle

void trap(iterable<array-key,int>|int $signals, $callback)

Определить обратный вызов, который будет выполнен при возникновении указанного сигнала(ов).

Parameters

iterable<array-key,int>|int $signals
$callback

Return Value

void

void untrap()

internal

Отменить обработчики сигналов, установленные в обработчике команды.

Return Value

void
END_OF_DOCUMENT_MARKER

protected void interact(InputInterface $input, OutputInterface $output)

Взаимодействовать с пользователем перед валидацией ввода.

Parameters

InputInterface $input
OutputInterface $output

Return Value

void

protected void promptForMissingArguments(InputInterface $input, OutputInterface $output)

Запросить у пользователя отсутствующие аргументы.

Parameters

InputInterface $input
OutputInterface $output

Return Value

void

protected array promptForMissingArgumentsUsing()

Запрос отсутствующих входных аргументов с использованием возвращенных вопросов.

Return Value

array

protected void afterPromptingForMissingArguments(InputInterface $input, OutputInterface $output)

Выполнить действия после запроса отсутствующих аргументов у пользователя.

Parameters

InputInterface $input
OutputInterface $output

Return Value

void

protected bool didReceiveOptions(InputInterface $input)

Содержит ли входные данные какие-либо параметры, отличающиеся от значений по умолчанию.

Parameters

InputInterface $input

Return Value

bool

static void macro(string $name, object|callable $macro)

Зарегистрировать пользовательское макро.

Parameters

string $name
object|callable $macro

Return Value

void

static void mixin(object $mixin, bool $replace = true)

Добавить другой объект в класс.

Parameters

object $mixin
bool $replace

Return Value

void

Exceptions

ReflectionException

static bool hasMacro(string $name)

Проверка наличия зарегистрированного макроса.

Parameters

string $name

Return Value

bool

static void flushMacros()

Очистить существующие макросы.

Return Value

void

static mixed __callStatic(string $method, array $parameters)

Динамическое обращение к классу.

Parameters

string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

mixed __call(string $method, array $parameters)

Динамическое обращение к классу.

Parameters

string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

void __construct(MigrationRepositoryInterface $repository)

Создать новый экземпляр команды миграции.

Parameters

MigrationRepositoryInterface $repository

Return Value

void

protected void configureUsingFluentDefinition()

Настроить команду консоли с помощью определения fluent.

Return Value

void

protected void configureIsolation()

Настроить команду консоли для изоляции.

Return Value

void

int run(InputInterface $input, OutputInterface $output)

Выполнить команду консоли.

Parameters

InputInterface $input
OutputInterface $output

Return Value

int

protected int execute(InputInterface $input, OutputInterface $output)

Выполнить команду консоли.

Parameters

InputInterface $input
OutputInterface $output

Return Value

int

protected CommandMutex commandIsolationMutex()

Получить экземпляр мьютекса изоляции команды.

Return Value

CommandMutex

bool isHidden()

{@inheritdoc}

Return Value

bool

Command setHidden(bool $hidden = true)

{@inheritdoc}

Parameters

bool $hidden

Return Value

Command

Application getLaravel()

Получить экземпляр приложения Laravel.

Return Value

Application

void setLaravel(Container $laravel)

Установить экземпляр приложения Laravel.

Параметры

Container $laravel

Возвращаемое значение

void

void handle()

Выполнить консольную команду.

Возвращаемое значение

void

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/9.x/Illuminate/Database/Console/Migrations/InstallCommand.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API