DevelopmentHandler
class DevelopmentHandler implements HandlerInterface
Development handler.
Traits
Handler helper trait.
Properties
protected Run | $whoops | Whoops. | |
protected Request | $request | Request instance. | |
protected Response | $response | Response instance. | |
protected Application | $app | Application instance. |
Methods
bool
returnAs(string $function, array $mimes, string $partial)
Checks if we meet the requirements to return as a specific type.
from HandlerHelperTrait
int
from HandlerHelperTrait
sendResponse(Response $response, Throwable $exception)
Sends response and adds any aditional headers.
from HandlerHelperTrait
HandlerInterface
getWhoopsHandler()
Returns a Whoops handler.
configureWhoops()
Configure Whoops.
Details
in HandlerHelperTrait at line 35
protected bool
returnAs(string $function, array $mimes, string $partial)
Checks if we meet the requirements to return as a specific type.
in HandlerHelperTrait at line 62
protected bool
returnAsJson()
Should we return the error as JSON?
in HandlerHelperTrait at line 72
protected bool
returnAsXml()
Should we return the error as XML?
in HandlerHelperTrait at line 83
protected int
getStatusCode(Throwable $exception)
Returns the status code that we should send.
in HandlerHelperTrait at line 94
protected
sendResponse(Response $response, Throwable $exception)
Sends response and adds any aditional headers.
at line 69
__construct(Run $whoops, Request $request, Response $response, Application $app)
Constructor.
at line 87
protected HandlerInterface
getWhoopsHandler()
Returns a Whoops handler.
at line 126
protected
configureWhoops()
Configure Whoops.
at line 138
mixed
handle(Throwable $exception)
Handles the exception.