Spec-Zone.ru › Laravel 10

MigrateMakeCommand

class MigrateMakeCommand extends BaseCommand implements PromptsForMissingInput (View source)

Свойства

CallsCommands
ConfiguresPrompts
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

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

from InteractsWithIO
protected Signals|null $signals

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

from InteractsWithSignals
static protected array $macros

Зарегистрированные строковые макросы.

from Macroable
protected Application $laravel

Экземпляр приложения Laravel.

from Command
protected string $signature

Подпись консольной команды.

protected string $name

Имя консольной команды.

from Command
protected string $description

Описание консольной команды.

protected string $help

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

from Command
protected bool $hidden

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

from Command
protected bool $isolated

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

from Command
protected int $isolatedExitCode

Код выхода по умолчанию для изолированных команд.

from Command
protected array $aliases

Псевдонимы имени консольной команды.

from Command
protected MigrationCreator $creator

Экземпляр создателя миграций.

protected Composer deprecated $composer

Экземпляр Composer.

Методы

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

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

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, int|string|null $verbosity = null)

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

from InteractsWithIO
$this newLine(int $count = 1)

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

from InteractsWithIO
void setInput(InputInterface $input)

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

from InteractsWithIO
void setOutput(OutputStyle $output)

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

from InteractsWithIO
void setVerbosity(string|int $level)

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

from InteractsWithIO
int parseVerbosity(string|int|null $level = null)

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

from InteractsWithIO
OutputStyle getOutput()

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

from InteractsWithIO
Factory outputComponents()

Получить реализацию фабрики компонентов вывода.

from InteractsWithIO
trap($signals, $callback)

Без описания

from InteractsWithSignals
void untrap()

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

from InteractsWithSignals
void interact(InputInterface $input, OutputInterface $output)

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

from PromptsForMissingInput
void promptForMissingArguments(InputInterface $input, OutputInterface $output)

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

from PromptsForMissingInput
array promptForMissingArgumentsUsing()

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

void afterPromptingForMissingArguments(InputInterface $input, OutputInterface $output)

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

from PromptsForMissingInput
bool didReceiveOptions(InputInterface $input)

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

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

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

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

Смешать другой объект в класс.

from Macroable
static bool hasMacro(string $name)

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

from Macroable
static void flushMacros()

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

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

Динамически обработать вызовы класса.

from Macroable
mixed __call(string $method, array $parameters)

Динамически обработать вызовы класса.

from Macroable
void __construct(MigrationCreator $creator, Composer $composer)

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

void configureUsingFluentDefinition()

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

from Command
void configureIsolation()

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

from Command
int run(InputInterface $input, OutputInterface $output)

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

from Команда
int execute(InputInterface $input, OutputInterface $output)

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

from Команда
CommandMutex commandIsolationMutex()

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

from Команда
bool isHidden()

{@inheritdoc}

from Команда
Команда setHidden(bool $hidden = true)

{@inheritdoc}

from Команда
Приложение getLaravel()

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

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

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

from Команда
array getMigrationPaths()

Получить все пути миграций.

from БазоваяКоманда
bool usingRealPath()

Определить, являются ли заданные путь(и) предварительно разрешенными "реальными" путями.

from БазоваяКоманда
string getMigrationPath()

Получить путь миграции (указанный параметром '--path' или по умолчанию).

void handle()

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

void writeMigration(string $name, string $table, bool $create)

Записать файл миграции на диск.

Подробности

abstract protected Команда resolveCommand(Command|string $command)

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

Parameters

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

Return Value

Команда

int call(Command|string $command, array $arguments = [])

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

Parameters

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

Return Value

int

int callSilent(Command|string $command, array $arguments = [])

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

Parameters

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

Return Value

int

int callSilently(Command|string $command, array $arguments = [])

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

Parameters

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

Return Value

int

protected int runCommand(Command|string $command, array $arguments, OutputInterface $output)

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

Parameters

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

Return Value

int

protected ArrayInput createInputFromArguments(array $arguments)

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

Parameters

array $arguments

Return Value

ArrayInput

protected array context()

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

Return Value

array

protected void configurePrompts(InputInterface $input)

Настроить подсказки.

Parameters

InputInterface $input

Return Value

void

protected mixed promptUntilValid(Closure $prompt, bool|string $required, Closure|null $validate)

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

Parameters

Closure $prompt
bool|string $required
Closure|null $validate

Return Value

mixed

protected void restorePrompts()

Восстановить вывод подсказок.

Return Value

void

protected void specifyParameters()

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

Return Value

void

protected array getArguments()

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

Return Value

array

protected array getOptions()

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

Return Value

array

bool hasArgument(string|int $name)

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

Parameters

string|int $name

Return Value

bool
END_OF_DOCUMENT_MARKER

array|string|bool|null argument(string|null $key = null)

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

Параметры

string|null $key

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

array|string|bool|null

array arguments()

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

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

array

bool hasOption(string $name)

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

Параметры

string $name

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

bool

string|array|bool|null option(string|null $key = null)

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

Параметры

string|null $key

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

string|array|bool|null

array options()

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

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

array

bool confirm(string $question, bool $default = false)

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

Параметры

string $question
bool $default

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

bool

mixed ask(string $question, string|null $default = null)

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

Параметры

string $question
string|null $default

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

mixed

mixed anticipate(string $question, array|callable $choices, string|null $default = null)

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

Параметры

string $question
array|callable $choices
string|null $default

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

mixed

mixed askWithCompletion(string $question, array|callable $choices, string|null $default = null)

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

Параметры

string $question
array|callable $choices
string|null $default

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

mixed

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

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

Параметры

string $question
bool $fallback

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

mixed

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

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

Параметры

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

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

string|array

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

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

Параметры

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

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

void

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

Выполнение заданного обратного вызова с продвижением полосы прогресса.

Параметры

iterable|int $totalSteps
Closure $callback

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

mixed|void

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

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

Параметры

string $string
int|string|null $verbosity

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

void

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

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

Параметры

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

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

void

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

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

Параметры

string $string
int|string|null $verbosity

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

void

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

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

Параметры

string $string
int|string|null $verbosity

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

void

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

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

Параметры

string $string
int|string|null $verbosity

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

void

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

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

Параметры

string $string
int|string|null $verbosity

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

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

Factory outputComponents()

Получить реализацию фабрики компонентов вывода.

Return Value

Factory

trap($signals, $callback)

Описание отсутствует

Parameters

$signals
$callback

void untrap()

internal

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

Return Value

void

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(MigrationCreator $creator, Composer $composer)

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

Параметры

MigrationCreator $creator
Composer $composer

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

void

protected void configureUsingFluentDefinition()

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

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

void

protected void configureIsolation()

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

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

void

int run(InputInterface $input, OutputInterface $output)

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

Параметры

InputInterface $input
OutputInterface $output

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

int

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

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

Параметры

InputInterface $input
OutputInterface $output

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

int

protected CommandMutex commandIsolationMutex()

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

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

CommandMutex

bool isHidden()

{@inheritdoc}

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

bool

Command setHidden(bool $hidden = true)

{@inheritdoc}

Параметры

bool $hidden

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

Command

Application getLaravel()

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

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

Application

void setLaravel(Container $laravel)

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

Параметры

Container $laravel

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

void

protected array getMigrationPaths()

Получить все пути к миграциям.

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

array

protected bool usingRealPath()

Определить, являются ли заданные путь(и) предопределёнными "действительными" путями.

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

bool

protected string getMigrationPath()

Получить путь к миграции (указанный опцией '--path' или по умолчанию).

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

string

void handle()

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

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

void

protected void writeMigration(string $name, string $table, bool $create)

Записать файл миграции в диск.

Параметры

string $name
string $table
bool $create

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

void

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

Spec-Zone.ru

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