Spec-Zone.ru › Laravel 4.2

UpCommand

class UpCommand extends Command (View source)

Свойства

protected Application $laravel Экземпляр приложения Laravel. from Command
protected InputInterface $input Реализация интерфейса ввода. from Command
protected OutputInterface $output Реализация интерфейса вывода. from Command
protected string $name Имя команды консоли.
protected string $description Описание команды консоли.

Методы

void __construct()

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

from Command
void specifyParameters()

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

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

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

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

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

from Command
int call(string $command, array $arguments = array())

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

from Command
int callSilent(string $command, array $arguments = array())

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

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

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

from Command
string|array option(string $key = null)

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

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

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

from Command
string ask(string $question, string $default = null)

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

from Command
string askWithCompletion(string $question, array $choices, string $default = null)

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

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

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

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

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

from Command
void table(array $headers, array $rows, string $style = 'default')

Форматировать входные данные в таблицу.

from Command
void info(string $string)

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

from Command
void line(string $string)

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

from Command
void comment(string $string)

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

from Command
void question(string $string)

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

from Command
void error(string $string)

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

from Command
array getArguments()

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

from Command
array getOptions()

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

from Command
OutputInterface getOutput()

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

from Command
Application getLaravel()

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

from Command
void setLaravel(Application $laravel)

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

from Command
void fire()

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

Подробное описание

void __construct()

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

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

void

protected void specifyParameters()

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

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

void

int run(InputInterface $input, OutputInterface $output)

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

Параметры

InputInterface $input
OutputInterface $output

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

int
END_OF_DOCUMENT_MARKER

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

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

Параметры

InputInterface $input
OutputInterface $output

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

mixed

int call(string $command, array $arguments = array())

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

Параметры

string $command
array $arguments

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

int

int callSilent(string $command, array $arguments = array())

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

Параметры

string $command
array $arguments

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

int

string|array argument(string $key = null)

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

Параметры

string $key

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

string|array

string|array option(string $key = null)

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

Параметры

string $key

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

string|array

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

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

Параметры

string $question
bool $default

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

bool

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

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

Параметры

string $question
string $default

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

string

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

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

Параметры

string $question
array $choices
string $default

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

string

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

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

Параметры

string $question
bool $fallback

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

string

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

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

Параметры

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

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

bool

void table(array $headers, array $rows, string $style = 'default')

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

Параметры

array $headers
array $rows
string $style

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

void

void info(string $string)

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

Параметры

string $string

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

void

void line(string $string)

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

Параметры

string $string

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

void

void comment(string $string)

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

Параметры

string $string

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

void

void question(string $string)

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

Параметры

string $string

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

void

void error(string $string)

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

Параметры

string $string

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

void

protected array getArguments()

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

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

array

protected array getOptions()

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

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

array

OutputInterface getOutput()

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

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

OutputInterface

Application getLaravel()

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

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

Application

void setLaravel(Application $laravel)

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

Параметры

Application $laravel

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

void

void fire()

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

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

void

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

Spec-Zone.ru

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