Spec-Zone.ru › Laravel 6

DownCommand

класс DownCommand расширяет Command (View source)

Трейты

InteractsWithTime
CallsCommands
HasParameters
InteractsWithIO
Macroable

Свойства

protected InputInterface $input

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

из InteractsWithIO
protected OutputStyle $output

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

из InteractsWithIO
protected int $verbosity

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

из InteractsWithIO
protected array $verbosityMap

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

из InteractsWithIO
static protected array $macros

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

из Macroable
protected Application $laravel

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

из Command
protected string $signature

Сигнатура команды консоли.

protected string $name

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

из Command
protected string $description

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

protected string|null $help

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

из Command
protected bool $hidden

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

из Command

Методы

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

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

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

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

из CallsCommands
int callSilent(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()

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

из HasParameters
bool hasArgument(string|int $name)

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

из InteractsWithIO
string|массив|null argument(string|null $key = null)

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

из InteractsWithIO
массив arguments()

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

из InteractsWithIO
bool hasOption(string $name)

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

из InteractsWithIO
string|массив|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
string choice(string $question, array $choices, string|null $default = null, mixed|null $attempts = null, bool|null $multiple = null)

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

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

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

из 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)

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

из 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
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 mixed __callStatic(string $method, array $parameters)

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

из Macroable
mixed __call(string $method, array $parameters)

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

из Macroable
void __construct()

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

из Command
void configureUsingFluentDefinition()

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

из Command
int run(InputInterface $input, OutputInterface $output)

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

из Command
mixed execute(InputInterface $input, OutputInterface $output)

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

из Command
isHidden()

{@inheritdoc}

из Command
setHidden($hidden)

{@inheritdoc}

из Command
Application getLaravel()

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

из Command
void setLaravel(Container $laravel)

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

из Command
int secondsUntil(DateTimeInterface|DateInterval|int $delay)

Получить количество секунд до заданного DateTime.

из InteractsWithTime
int availableAt(DateTimeInterface|DateInterval|int $delay = 0)

Получить метку времени UNIX «доступно в».

из InteractsWithTime
DateTimeInterface|int parseDateInterval(DateTimeInterface|DateInterval|int $delay)

Если заданное значение является интервалом, преобразуйте его в экземпляр DateTime.

из InteractsWithTime
int currentTime()

Получить текущее системное время как метку времени UNIX.

из InteractsWithTime
int handle()

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

array getDownFilePayload()

Получить данные полезной нагрузки, которые необходимо поместить в файл «down».

int|null getRetryTime()

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

Подробности

abstract protected Command resolveCommand(Command|string $command)

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

Parameters

Command|string $command

Return Value

Command

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

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

Parameters

Command|string $command
array $arguments

Return Value

int

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

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

Parameters

Command|string $command
array $arguments

Return Value

int

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

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

Parameters

Command|string $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 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

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

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

Parameters

string|null $key

Return Value

string|array|null

array arguments()

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

Return Value

array

bool hasOption(string $name)

Определить, присутствует ли данная опция.

Parameters

string $name

Return Value

bool

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

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

Parameters

string|null $key

Return Value

string|array|bool|null

array options()

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

Return Value

array

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

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

Parameters

string $question
bool $default

Return Value

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 choice(string $question, array $choices, string|null $default = null, mixed|null $attempts = null, bool|null $multiple = null)

Предложить пользователю один вариант из списка ответов.

Parameters

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

Return Value

string

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

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

Parameters

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

Return Value

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)

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

Параметры

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)

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

Параметры

string $string

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

void

void setInput(InputInterface $input)

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

Параметры

InputInterface $input

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

void

void setOutput(OutputStyle $output)

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

Параметры

OutputStyle $output

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

void

protected void setVerbosity(string|int $level)

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

Параметры

string|int $level

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

void

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

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

Параметры

string|int|null $level

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

int

OutputStyle getOutput()

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

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

OutputStyle

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

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

Параметры

string $name
object|callable $macro

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

void

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

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

Параметры

object $mixin
bool $replace

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

void

Исключения

ReflectionException

static bool hasMacro(string $name)

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

Параметры

string $name

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

bool

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

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

Параметры

string $method
array $parameters

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

mixed

Исключения

BadMethodCallException

mixed __call(string $method, array $parameters)

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

Параметры

string $method
array $parameters

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

mixed

Исключения

BadMethodCallException

void __construct()

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

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

void

protected void configureUsingFluentDefinition()

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

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

void

int run(InputInterface $input, OutputInterface $output)

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

Параметры

InputInterface $input
OutputInterface $output

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

int

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

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

Параметры

InputInterface $input
OutputInterface $output

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

mixed

isHidden()

{@inheritdoc}

setHidden($hidden)

{@inheritdoc}

Параметры

$hidden
END_OF_DOCUMENT_MARKER

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

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

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

Приложение

void setLaravel(Контейнер $laravel)

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

Параметры

Контейнер $laravel

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

void

protected int secondsUntil(DateTimeInterface|DateInterval|int $delay)

Получить количество секунд до указанной даты.

Параметры

DateTimeInterface|DateInterval|int $delay

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

int

protected int availableAt(DateTimeInterface|DateInterval|int $delay = 0)

Получить отметку времени «доступно в» в формате UNIX.

Параметры

DateTimeInterface|DateInterval|int $delay

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

int

protected DateTimeInterface|int parseDateInterval(DateTimeInterface|DateInterval|int $delay)

Если заданное значение является интервалом, преобразует его в экземпляр DateTime.

Параметры

DateTimeInterface|DateInterval|int $delay

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

DateTimeInterface|int

protected int currentTime()

Получить текущее системное время в формате UNIX.

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

int

int handle()

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

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

int

protected array getDownFilePayload()

Получить данные для файла «down».

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

array

protected int|null getRetryTime()

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

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

int|null

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/6.x/Illuminate/Foundation/Console/DownCommand.html

Spec-Zone.ru

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