PHP Class vova07\console\ConsoleRunner

Usage: ... $cr = new ConsoleRunner(['file' => '@my/path/to/yii']); $cr->run('controller/action param1 param2 ...'); ... or use it like an application component: config.php ... components [ 'consoleRunner' => [ 'class' => 'vova07\console\ConsoleRunner', 'file' => '@my/path/to/yii' // or an absolute path to console file ] ] ... some-file.php Yii::$app->consoleRunner->run('controller/action param1 param2 ...');
Inheritance: extends yii\base\Component
Afficher le fichier Open project: vova07/yii2-console-runner-extension Class Usage Examples

Méthodes publiques

Свойство Type Description
$file Console application file that will be executed. Usually it can be yii file.

Méthodes publiques

Méthode Description
init ( )
run ( string $cmd ) : boolean Running console command on background

Méthodes protégées

Méthode Description
isWindows ( ) : boolean Check operating system

Method Details

init() public méthode

public init ( )

isWindows() protected méthode

Check operating system
protected isWindows ( ) : boolean
Résultat boolean true if it's Windows OS

run() public méthode

Running console command on background
public run ( string $cmd ) : boolean
$cmd string Argument that will be passed to console application
Résultat boolean

Property Details

$file public_oe property

Console application file that will be executed. Usually it can be yii file.
public $file