ServerInterface
interface ServerInterface (View source)
Methods
addMiddleware(MiddlewareInterface $middleware, int $priority = 10)
Add a middlware callable to the stack Middleware are callables that get an opportunity to do stuff with the request during handling.
Response
handleRequest(Request $request)
Handle a request and return a response
Details
ServerInterface
setDispatcher(DispatcherInterface $dispatcher)
Set the dispatcher this server uses.
A dispatcher is used to handle the final conversion from request to response function ($request, $response) : Response;
ServerInterface
addMiddleware(MiddlewareInterface $middleware, int $priority = 10)
Add a middlware callable to the stack Middleware are callables that get an opportunity to do stuff with the request during handling.
ServerInterface
removeMiddleware(MiddlewareInterface $middleware)
Remove a middleware
Response
handleRequest(Request $request)
Handle a request and return a response