HttpServer
class HttpServer (View source)
The Server class.
Methods
Create a Server instance
Create a Server instance from an existing request object
Create a Server instance from an existing request object
Execute the server.
Method to get property Handler
Method to set property handler
Method to get property Request
Method to set property request
Method to get property Output
Method to get property Response
Method to set property response
Details
at line line 68
static HttpServer
createFromGlobals(callable $handler = null, array $server = array(), array $query = array(), array $body = array(), array $cookies = array(), array $files = array())
Create a Server instance
Creates a server instance from the callback and the following PHP environmental values:
at line line 90
static HttpServer
create(callable $handler = null, ServerRequestInterface $request, ResponseInterface $response = null, OutputInterface $output = null)
Create a Server instance from an existing request object
Provided a callback, an existing request object, and optionally an existing response object, create and return the Server instance.
If no Response object is provided, one will be created.
at line line 108
__construct(callable $handler = null, ServerRequestInterface $request, ResponseInterface $response = null, OutputInterface $output = null)
Create a Server instance from an existing request object
Provided a callback, an existing request object, and optionally an existing response object, create and return the Server instance.
If no Response object is provided, one will be created.
at line line 121
listen(callable $errorHandler = null)
Execute the server.
at line line 143
callable
getHandler()
Method to get property Handler
at line line 155
HttpServer
setHandler(callable $handler)
Method to set property handler
at line line 167
ServerRequestInterface
getRequest()
Method to get property Request
at line line 179
HttpServer
setRequest(ServerRequestInterface $request)
Method to set property request
at line line 191
OutputInterface
getOutput()
Method to get property Output
at line line 208
HttpServer
setOutput(Output $output)
Method to set property output
at line line 220
ResponseInterface
getResponse()
Method to get property Response
at line line 232
HttpServer
setResponse(ResponseInterface $response)
Method to set property response