PHP Class 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.
Author: Basil Suter ([email protected])
Inheritance: extends yii\console\Controller
Afficher le fichier Open project: luyadev/luya

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
output ( string $message, string $color = null ) Helper method for writting console application output, include before and after wrappers.

Method Details

isMuted() public méthode

Helper method to see if the current Application is muted or not. If the Application is muted, no output will displayed.
public isMuted ( ) : boolean
Résultat boolean

output() protected méthode

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() public méthode

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.
Résultat number Exit code 1

outputInfo() public méthode

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.
Since: 1.0.0-beta5
public outputInfo ( string $message ) : number
$message string The message which sould be displayed.
Résultat number Exit code 0

outputSuccess() public méthode

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
Résultat number Exit code 0