Skip to content

A simple PHP middleware pipeline. - 一个简单的 PHP 中间件管道。

License

Notifications You must be signed in to change notification settings

coolephp/pipeline

Repository files navigation

pipeline

简体中文 | ENGLISH

A simple PHP middleware pipeline. - 一个简单的 PHP 中间件管道。

Tests Check & fix styling codecov Latest Stable Version Total Downloads License

Requirement

  • PHP >= 7.2

Installation

$ composer require coolephp/pipeline --prefer-dist -vvv

Register Service

config\app.php add

<?php

return [
    /*
     * 第三方服务
     */
    'providers' => [
        ...
        \Coole\Pipeline\PipelineServiceProvider::class,
        ...
    ],
];

Usage

app('pipeline')
	->send($object)
    ->through($middleware)
    // ->with('bar')
    // ->via('differentMethod')
    // ->thenReturn()
    ->then(function(){
    	// middleware is finished
    });

Testing

$ composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

A simple PHP middleware pipeline. - 一个简单的 PHP 中间件管道。

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages