Download the PHP package hotaruma/pipeline without Composer
On this page you can find all versions of the php package hotaruma/pipeline. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hotaruma/pipeline
More information about hotaruma/pipeline
Files in hotaruma/pipeline
Package pipeline
Short Description Pipeline library built on top of PSR-15, PSR-7, and PSR-11 standards for handling HTTP requests and responses with middleware support.
License MIT
Homepage https://github.com/hotaruma/pipeline
Informations about the package pipeline
PSR-15 Pipeline
Pipeline library for handling HTTP requests and responses with middleware.
Features
- Integration with PSR-7 HTTP messages and PSR-11 container.
- Support for middleware/pipeline chaining to process HTTP requests in a flexible way.
Installation
You can install the library using Composer. Run the following command:
Usage
Simple example of how you can use Pipeline
to process an HTTP request:
By nesting pipelines within one another, it becomes possible to compose more complex and reusable middleware structures, providing flexibility and modularity in application development.
Using a pipeline as a request handler.
Pipeline can be rewound.
We can pass request handler as a callable.
Resolvers are responsible for resolving middleware and request handler classes, allowing for dynamic retrieval and instantiation of these components within the pipeline. By default, pipelines usually use a specific resolver implementation.
The middleware store is responsible for managing and storing the middleware that is added to the pipeline. It provides the necessary functionality to add, retrieve, and execute the middleware in the desired order.
Contributing
Contributions are welcome! If you find a bug or have an idea for a new feature, please open an issue or submit a pull request.