pangolinkeys/pipe 问题修复 & 功能扩展

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

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

pangolinkeys/pipe

Composer 安装命令:

composer require pangolinkeys/pipe

包简介

Package to provide standardisation to the pipe pattern

README 文档

README

Repository to provide a simple implementation of the pipeline pattern in PHP.

To use implement the Pipeline trait. Call ->pipe() from your class passing a list of objects that implement the ProvidesPipeline class. Optionally use InitializePipeline helper class to get your values into the pipeline.

See the Example folder inside the tests folder for a working example.

return $this->pipe(
        new InitializePipeline($value),
        new DivideByTwo,
        new DivideByTwo,
        new TimesByOneThousand,
        new TimesByOneThousand
);

Composer

To install this package into your composer projects run:

composer require pangolinkeys/pipe

Context Pipeline

You can optionally implement ProvidesContextPipeline to be passed an instance of the piping object within the pipeline. This will be given as a second parameter to the handle method.

Pipe by class name

As of v2 you can define a pipeline by reference to the class name and allow the pipeline to handle class instantiation.

return $this->pipe(
    new InitializePipeline($value),
    DivideByTwo::class,
    TimesByOneThousand::class
);

统计信息

  • 总下载量: 70
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-10-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固