Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Creates the RequestHandlerMiddleware class #150

Conversation

weierophinney
Copy link
Member

This class will decorate a RequestHandlerInterface instance such that it can act as either a request handler or middleware. When either handle() or process() are called, the class will instead proxy to the composed handler's handle() method, returning the result.

This can be useful for decorating request handlers to use within pipelines.

(Planned usage is within zend-expressive to allow decorating request handlers as middleware before piping to a pipeline or passing to a Route instance, and within zend-expressive-router, to decorate handlers as middleware within the constructor, so that getMiddleware() can return a single type.)

This class will decorate a `RequestHandlerInterface` instance such that
it can act as either a request handler or middleware. When either
`handle()` or `process()` are called, the class will instead proxy to
the composed handler's `handle()` method, returning the result.

This can be useful for decorating request handlers to use within
pipelines.
@weierophinney weierophinney added this to the 3.0.0alpha3 milestone Feb 5, 2018
@weierophinney weierophinney merged commit 81ba9ec into zendframework:release-3.0.0 Feb 5, 2018
@weierophinney weierophinney deleted the feature/request-handler-middleware branch February 5, 2018 21:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant