Server
in
Interface Server
Represents a wrapper around PHP's superglobal $_SERVER
, allowing for better abstraction,
testability, and dependency injection.
This interface provides methods to access HTTP request information and send a response.
Table of Contents
Methods
- getRequest() : Request
- Get request sent by the client.
- sendResponse() : void
- Sends the provided HTTP response to the client.
Methods
getRequest()
Get request sent by the client.
public
getRequest() : Request
Return values
RequestsendResponse()
Sends the provided HTTP response to the client.
public
sendResponse(Response $response) : void
Parameters
- $response : Response
-
The response object to be sent.