This is a sandbox for developing the PSR-17 interfaces, and seeing how implementations might be created, using Diactoros as the underlying PSR-7 implementation for generated instances.
Interfaces are in the interfaces tree.
Currently, it describes four possible implementations:
-
decorated: This approach has any implementation of an interface that extends other interfaces compose the collaborators, and act as a proxy to those collaborators via the implementation methods.
-
duplicated: This approach has any implementation of an interface that extends other interfaces fully define all methods in situ (and thus duplicating logic).
-
static factories: This approach uses abstract static factories to define reusable factories for any interfaces that may be re-used/extended. Implementations then proxy to the static methods.
-
traits: This approach is similar to the static approach, but instead defines PHP traits; implementations compose these in order to provide implementations.