Spec-Zone.ru › Laravel 9

ResetCommand

class ResetCommand extends BaseCommand (View source)

Трейты

ConfirmableTrait
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 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 Migrator $migrator

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

Методы

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

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

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)

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

from InteractsWithIO
OutputStyle getOutput()

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

from InteractsWithIO
void trap(iterable<array-key,int>|int $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()

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

from PromptsForMissingInput
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(Migrator $migrator)

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

void configureUsingFluentDefinition()

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

from Command
void configureIsolation()

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

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

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

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

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

from Command
CommandMutex commandIsolationMutex()

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

from Command
bool isHidden()

{@inheritdoc}

from Command
Command setHidden(bool $hidden = true)

{@inheritdoc}

from Command
Приложение getLaravel()

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

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

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

из Команды
массив getMigrationPaths()

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

из КомандыBaseCommand
bool usingRealPath()

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

из КомандыBaseCommand
строка getMigrationPath()

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

из КомандыBaseCommand
bool confirmToProceed(строка $warning = 'Приложение в рабочем состоянии', Closure|bool|null $callback = null)

Подтвердить действие перед продолжением.

из ConfirmableTrait
Closure getDefaultConfirmCallback()

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

из ConfirmableTrait
целое число обработать()

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

Подробности

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

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

Параметры

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

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

Команда

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

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

Параметры

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

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

целое число

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

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

Параметры

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

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

целое число

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

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

Параметры

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

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

целое число

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

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

Параметры

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

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

целое число

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

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

Параметры

массив $arguments

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

ArrayInput

protected массив context()

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

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

массив

protected void specifyParameters()

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

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

void

protected массив getArguments()

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

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

массив

protected массив getOptions()

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

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

массив

bool hasArgument(строка|целое число $name)

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

Параметры

строка|целое число $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

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

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

Parameters

string $question
string|null $default

Return Value

mixed

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

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

Parameters

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

Return Value

mixed

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

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

Parameters

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

Return Value

mixed

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

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(Migrator $migrator)

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

Parameters

Migrator $migrator

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()

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

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

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()

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

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

string

bool confirmToProceed(string $warning = 'Application In Production', Closure|bool|null $callback = null)

Подтвердить выполнение действия перед его выполнением.

Этот метод запрашивает подтверждение только в случае производства.

Параметры

string $warning
Closure|bool|null $callback

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

bool

protected Closure getDefaultConfirmCallback()

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

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

Closure

int handle()

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

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

int

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

Spec-Zone.ru

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