Download the PHP package psg/psr-101 without Composer
On this page you can find all versions of the php package psg/psr-101. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor psg
Package psr-101
Short Description PSR 15 remake into AppInterface
License MIT
Homepage https://github.com/php-sg/psr-100
Package psr-101
Short Description PSR 15 remake into AppInterface
License MIT
Homepage https://github.com/php-sg/psr-100
Please rate this library. Is it a good library?
Informations about the package psr-101
==== This is not a FIG PSR and has not undergone the rigorous process to become one ====
PSR 101
This is a rewrite of PSR 15, and an inclusion of PSR 17 into the MiddlewareAppInterface. Various ideas went into this:
- Because the inteface method parameters must match (see PSR 100 README), and because PSR 101 middleware required the handler to be the extended version of the RequestionHandlerInterface, PSR 15 could not be extended for the middleware interfaces
- To write standardized middleware, the method of using PSR 17 factories should be standardized
- To do this, the MiddlewareAppInterface provides access to those factories
- Some middleware does not care about the App, it only wants a closure for a
next
call. This type of middleware is separately provided for asMiddlewareNextInterface
- Apps should handle this sort of middleware by detecting which type of middleware and applying correctly
- Middleware is expected with MiddlewareAppInterface. As such there are methods for adding, removing and checking middleware.
- These methods are the uncontexted
has
,add
,remove
. The expectation here is that frameworks will generally not have these methods on their $app object (b/c they are too general), but that, it would make sense for these methods to refer to middleware. Further, to add something likeaddMiddleware
to the interface potentially conflicts with existing methods on $app objects of frameworks.
- These methods are the uncontexted
Use
Let's see a middleware based on this PSR 101
All versions of psr-101 with dependencies
PHP Build Version
Package Version
The package psg/psr-101 contains the following files
Loading the files please wait ....