Spec-Zone.ru › Laravel 6

ServeCommand

class ServeCommand extends Command (View source)

Трейты

CallsCommands
HasParameters
InteractsWithIO
Macroable

Свойства

protected InputInterface $input

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

from InteractsWithIO
protected OutputStyle $output

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

from InteractsWithIO
protected int $verbosity

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

from InteractsWithIO
protected array $verbosityMap

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

from InteractsWithIO
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|null $help

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

from Command
protected bool $hidden

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

from Command
protected int $portOffset

Текущий смещение порта.

Методы

Command resolveCommand(Command|string $command)

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

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

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

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

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

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

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

from CallsCommands
ArrayInput createInputFromArguments(array $arguments)

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

from CallsCommands
array context()

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

from CallsCommands
void specifyParameters()

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

from HasParameters
array getArguments()

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

from HasParameters
array getOptions()

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

bool hasArgument(string|int $name)

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

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

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

from InteractsWithIO
array arguments()

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

from InteractsWithIO
bool hasOption(string $name)

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

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

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

from InteractsWithIO
array options()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

from Macroable
void __construct()

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

from Command
void configureUsingFluentDefinition()

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

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

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

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

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

from Command
isHidden()

{@inheritdoc}

from Command
setHidden($hidden)

{@inheritdoc}

from Command
Application getLaravel()

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

from Command
void setLaravel(Container $laravel)

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

from Command
int handle()

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

string serverCommand()

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

string host()

Получить хост для команды.

string port()

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

bool canTryAnotherPort()

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

Details

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

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

Значение возврата

array

bool hasArgument(string|int $name)

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

Параметры

string|int $name

Значение возврата

bool

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

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

Параметры

string|null $key

Значение возврата

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

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

Параметры

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

Значение возврата

string

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

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

Параметры

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

Значение возврата

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
END_OF_DOCUMENT_MARKER

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

Application getLaravel()

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

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

Application

void setLaravel(Container $laravel)

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

Параметры

Container $laravel

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

void

int handle()

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

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

int

Исключения

Exception

protected string serverCommand()

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

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

string

protected string host()

Получить хост для команды.

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

string

protected string port()

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

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

string

protected bool canTryAnotherPort()

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

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

bool

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

Spec-Zone.ru

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