yii2-console-runner-extension

在Yii框架中在后台运行控制台命令的扩展。(An extension for running console commands on background in Yii framework.)

Github星跟踪图

Console Runner(控制台运行器)

在Yii框架中在后台运行控制台命令的扩展。

安装

将以下内容添加到 composer.json

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

然后执行 composer install

用法

导入 class:

use vova07\console\ConsoleRunner;
$cr = new ConsoleRunner(['file' => '@my/path/to/yii']);
$cr->run('controller/action param1 param2 ...');

应用组件

// 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 ...');

运行 Tests

$ phpunit

主要指标

概览
名称与所有者vova07/yii2-console-runner-extension
主编程语言PHP
编程语言PHP (语言数: 1)
平台BSD, Linux, Mac, Windows
许可证BSD 3-Clause "New" or "Revised" License
所有者活动
创建于2014-04-21 11:11:43
推送于2019-07-02 09:32:46
最后一次提交2018-01-20 19:10:40
发布数3
最新版本名称0.1.2 (发布于 2018-01-20 19:16:27)
第一版名称0.1.0 (发布于 2014-11-26 12:48:05)
用户参与
星数87
关注者数13
派生数24
提交数24
已启用问题?
问题数9
打开的问题数4
拉请求数4
打开的拉请求数1
关闭的拉请求数3
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?

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