vova07/yii2-console-runner-extension An extension for running console commands on background in Yii framework.

consolerunnercommandsbackground

Console Runner

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

An extension for running console commands on background in Yii framework.

Installation

Add the following to require section of your composer.json:

"vova07/yii2-console-runner-extension": "*"

Then do composer install.

Usage

Imported class:
use vova07\console\ConsoleRunner;
$cr = new ConsoleRunner(['file' => '@my/path/to/yii']);
$cr->run('controller/action param1 param2 ...');
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 ...');

Running Tests

$ phpunit

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



0.1.2 is the latest of 3 releases



BSD-3-Clause license
Stats
89 github stars & 23 github forks
51 downloads in the last day
1888 downloads in the last 30 days
142861 total downloads