Developing a PSR-7 Request class
One of the key characteristics of PSR-7 middleware is the use of Request and Response classes. When applied, this enables different blocks of software to perform together without sharing any specific knowledge between them. In this context, a request class should encompass all aspects of the original user request, including such items as browser settings, the original URL requested, parameters passed, and so forth.
How to do it...
- First, be sure to define classes to represent the
UploadedFilevalue objects, as described in the previous recipe.
- Now we are ready to define the core
Application\MiddleWare\Messageclass. This class consumes