PHP Класс luya\console\Controller

Extends the base controller by adding helper methods to output responses based on its muted behavior to run unit tests without respones.
Автор: Basil Suter ([email protected])
Наследование: extends yii\console\Controller
Показать файл Открыть проект

Открытые методы

Метод Описание
isMuted ( ) : boolean Helper method to see if the current Application is muted or not. If the Application is muted, no output will displayed.
outputError ( string $message ) : number Helper method to stop the console command with an error message, outputError returns exit code 1.
outputInfo ( string $message ) : number Helper method to stop the console command with a info message which is threated in case of returns as success but does have a different output color (blue). outputInfo returns exit code 0.
outputSuccess ( string $message ) : number Helper method to stop the console command with a success message, outputSuccess returns exit code 0.

Защищенные методы

Метод Описание
output ( string $message, string $color = null ) Helper method for writting console application output, include before and after wrappers.

Описание методов

isMuted() публичный Метод

Helper method to see if the current Application is muted or not. If the Application is muted, no output will displayed.
public isMuted ( ) : boolean
Результат boolean

output() защищенный Метод

Helper method for writting console application output, include before and after wrappers.
protected output ( string $message, string $color = null )
$message string The message which is displayed
$color string A color from {{\yii\helpers\Console}} color constants.

outputError() публичный Метод

Helper method to stop the console command with an error message, outputError returns exit code 1.
public outputError ( string $message ) : number
$message string The message which should be displayed.
Результат number Exit code 1

outputInfo() публичный Метод

Helper method to stop the console command with a info message which is threated in case of returns as success but does have a different output color (blue). outputInfo returns exit code 0.
С версии: 1.0.0-beta5
public outputInfo ( string $message ) : number
$message string The message which sould be displayed.
Результат number Exit code 0

outputSuccess() публичный Метод

Helper method to stop the console command with a success message, outputSuccess returns exit code 0.
public outputSuccess ( string $message ) : number
$message string The message which sould be displayed
Результат number Exit code 0