Should I implement both RequestInterface and ServerRequestInterface

904 views Asked by At

I am currently writing an implementation of the HTTP Message Interface Recommendation (PSR-7) for my personal PHP framework. I've written classes for each interface in the recommendation. But now I realize that I do not need an abstraction for outbound requests.

At the moment I have:

  • Message for MessageInterface,
  • Request for RequestInterface,
  • Response for ResponseInterface,
  • ServerRequest for ServerRequestInterface,
  • Stream for StreamInterface,
  • UploadedFile for UploadedFileInterface, and,
  • Uri for UriInterface.

I wonder if I must implement every interface of the recommendation to claim my framework uses it? Or may I only implement the parts of I need?

0

There are 0 answers