DevelopmentHandler
class DevelopmentHandler extends Handler implements HandlerInterface
Development handler.
Traits
Basic content negotiation.
Properties
protected Run | $whoops | Whoops. | |
protected Request | $request | Request instance. | |
protected Response | $response | Response instance. | |
protected Application | $app | Application instance. |
Methods
bool
expectsType(array $mimeTypes, string|null $suffix = null)
Does the client expect the provided mime type?
bool
respondWithType(array $mimeTypes, string|null $suffix = null)
Should we respond with the provided mime type?
sendResponse(Response $response, Throwable $exception)
Sends response and adds any aditional headers.
from Handler
HandlerInterface
getWhoopsHandler()
Returns a Whoops handler.
configureWhoops()
Configure Whoops.
Details
in ContentNegotiationTrait at line 27
protected bool
expectsType(array $mimeTypes, string|null $suffix = null)
Does the client expect the provided mime type?
in ContentNegotiationTrait at line 44
protected bool
expectsJson()
Does the client expect JSON?
in ContentNegotiationTrait at line 54
protected bool
expectsXml()
Does the client expect XML?
in ContentNegotiationTrait at line 66
protected bool
respondWithType(array $mimeTypes, string|null $suffix = null)
Should we respond with the provided mime type?
in ContentNegotiationTrait at line 83
protected bool
respondWithJson()
Should we respond with JSON?
in ContentNegotiationTrait at line 93
protected bool
respondWithXml()
Should we respond with XML?
in Handler at line 33
protected int
getStatusCode(Throwable $exception)
Returns the status code that we should send.
in Handler at line 44
protected
sendResponse(Response $response, Throwable $exception)
Sends response and adds any aditional headers.
at line 67
__construct(Run $whoops, Request $request, Response $response, Application $app)
Constructor.
at line 85
protected HandlerInterface
getWhoopsHandler()
Returns a Whoops handler.
at line 124
protected
configureWhoops()
Configure Whoops.
at line 136
mixed
handle(Throwable $exception)
Handles the exception.