Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 1.11 KB

CHANGELOG.md

File metadata and controls

15 lines (10 loc) · 1.11 KB

Version 2.0.0

Added

  • Introduced a new private property lastRequest of type ServerRequestInterface to store the last processed request.
  • Implemented the RequestHandlerInterface to adhere to the standardized request handling protocol.

Updated

  • Modified the constructor to include the ResponseInterface $response and array $stack parameters.
  • The handle method now assigns the incoming request to the lastRequest property before processing the middlewares stack.
  • Inside the handle method, the response generated by the middlewares stack is now assigned to a local variable $response before being returned.
  • Added a new public method getLastRequest to retrieve the last processed request. It returns a ServerRequestInterface|null, representing the last request or null if no request has been processed.

These changes enhance the RequestHandler class by providing the ability to track and retrieve the last processed request through the getLastRequest method. Additionally, the implementation of the RequestHandlerInterface ensures compatibility with standardized request handling practices.