task/process 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

task/process

Composer 安装命令:

composer require task/process

包简介

Process plugin for Task

README 文档

README

Build Status Coverage Status

Installation

Install via Composer:

...
    "require-dev": {
        "task/process": "~0.2"
    }
...

Usage

Inject into the project container:

use Task\Plugin\ProcessPlugin;

$project->inject(function ($container) {
    $container['ps'] = new ProcessPlugin;
});

$project->addTask('whoami', ['ps', function ($ps) {
    $ps->run('whoami')->pipe($this->getOutput());
}]);

API

run($command, array $args = [], $cwd = null, array $env = [], OutputInterface $output = null)

$command - The command run:

run('whoami');

array $args = [] - An array of command line arguments:

run('ls', ['-la']);

$cwd = null - The directory to execute the command in:

run('du', ['-hs'], '/path/to/my/project');

$env - An array of environment variables:

run('myscript', [], null, ['DEBUG' => 1]);
build($command, array $args = [])

Accepts the same $command and $args arguments as run, but returns an instance of Task\Plugin\Process\ProcessBuilder, which thinly wraps Symfony's ProcessBuilder, providing an OO interface to confguration a command.

统计信息

  • 总下载量: 2.98k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-04-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固