Skip to content

v2.0.0

Latest
Compare
Choose a tag to compare
@BMTmohammedtaha BMTmohammedtaha released this 29 Jun 16:22
· 2 commits to main since this release
  • Added a new private property lastRequest of type ServerRequestInterface to store the last processed request.
  • Updated the constructor to include the ResponseInterface $response and array $stack parameters.
  • The RequestHandler class now implements the RequestHandlerInterface.
  • Modified the handle method to assign 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 introduce the ability to track and retrieve the last processed request through the getLastRequest method, providing more flexibility and functionality to the RequestHandler class.