toriphes/yii2-console-runner Runs console command in yii web application

extensionapplicationwebconsolerunner

yii2-console-runner

Latest Stable Version Total Downloads Latest Unstable Version License

This is component for running console command in yii2 web applications

Installation

The preferred way to install this extension is through composer.

To install, either run

$ composer require toriphes/yii2-console-runner "*"

or add

"toriphes/yii2-console-runner": "*"

to the require section of your composer.json file.

Usage

You can user yii2-console-runner importing the class file

use toriphes\console\Runner;
$output = '';
$runner = new Runner();
$runner->run('controller/action param1 param2 ...', $output);
echo $output; //prints the command output

or using it like an application component:

//you config file
'components' => [
    'consoleRunner' => [
        'class' => 'toriphes\console\Runner'
    ]
]
//some application file
$output = '';
Yii::$app->consoleRunner->run('controller/action param1 param2 ...', $output);
echo $output; //prints the command output

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



1.2.1 is the latest of 4 releases



BSD-3-Clause license
Stats
28 github stars & 9 github forks
83 downloads in the last day
2535 downloads in the last 30 days
164708 total downloads