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
ファイルを表示 Open project: vova07/yii2-console-runner-extension Class Usage Examples

Public Properties

Property Type Description
$file Console application file that will be executed. Usually it can be yii file.

Public Methods

Method Description
init ( )
run ( string $cmd ) : boolean Running console command on background

Protected Methods

Method Description
isWindows ( ) : boolean Check operating system

Method Details

init() public method

public init ( )

isWindows() protected method

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

run() public method

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

Property Details

$file public_oe property

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