ProductionHandler
class ProductionHandler extends Handler implements HandlerInterface
Production handler.
Traits
Properties
| protected Request | $request | Request instance. | |
| protected Response | $response | Response instance. | |
| protected ViewFactory|null | $view | View factory instance. | 
Methods
Does the client expect the provided mime type?
Should we respond with the provided mime type?
Sends response and adds any aditional headers.
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 56
                            
    __construct(Request $request, Response $response, ViewFactory|null $view = null)
        
    
    Constructor.
        at         line 76
                    protected        array
    getStatusCodeAndMessage(Throwable $exception)
        
    
    Returns status code and message.
        at         line 97
                    protected        string
    getExceptionAsJson(Throwable $exception)
        
    
    Return a JSON representation of the exception.
        at         line 108
                    protected        string
    getExceptionAsXml(Throwable $exception)
        
    
    Return a XML representation of the exception.
        at         line 127
                    protected        string
    getExceptionAsRenderedView(Throwable $exception)
        
    
    Returns a rendered error view.
        at         line 157
                    protected        string
    getExceptionAsPlainText(Throwable $exception)
        
    
    Returns a plain text representation of the error.
        at         line 170
                    protected        string
    getBody(Throwable $exception)
        
    
    Returns a response body.
        at         line 201
                            mixed
    handle(Throwable $exception)
        
    
    Handles the exception.