toriphes/yii2-console-runner
最新稳定版本:1.2.1
Composer 安装命令:
composer require toriphes/yii2-console-runner
包简介
Runs console command in yii web application
README 文档
README
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
统计信息
- 总下载量: 229.24k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 29
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-06-13