Response
class Response
HTTP response.
Constants
| DEFAULT_STATUS | 
                     Default status code.  | 
            
Properties
| protected Request | $request | Request instance. | |
| protected mixed | $body | Response body. | |
| protected string | $contentType | Response content type. | |
| protected string | $charset | Response character set. | |
| protected int | $statusCode | Status code. | |
| protected Headers | $headers | Response headers. | |
| protected Cookies | $cookies | Cookies. | |
| protected bool | $outputCompression | Compress output? | |
| protected bool | $responseCache | Enable response cache? | |
| protected array | $statusCodes | HTTP status codes. | 
Methods
Returns the request instance.
Returns the response body.
Returns the response content type.
Sets the response character set.
Returns the response character set.
Returns the HTTP status code.
Returns response header collection.
Returns response cookie collection.
Sends response headers.
Is the response cacheable?
Enables ETag response cache.
Disables ETag response cache.
Enables output compression.
Disables output compression.
Send output to browser.
Details
        at         line 203
                            
    __construct(Request $request, string $charset = 'UTF-8', Signer|null $signer = null)
        
    
    Constructor.
        at         line 219
                            Request
    getRequest()
        
    
    Returns the request instance.
        at         line 230
                            Response
    setBody(mixed $body)
        
    
    Sets the response body.
        at         line 242
                            mixed
    getBody()
        
    
    Returns the response body.
        at         line 252
                            Response
    clearBody()
        
    
    Clears the response body.
        at         line 266
                            Response
    setType(string $contentType, string|null $charset = null)
        
    
    Sets the response content type.
        at         line 283
                            string
    getType()
        
    
    Returns the response content type.
        at         line 294
                            Response
    setCharset(string $charset)
        
    
    Sets the response character set.
        at         line 306
                            string
    getCharset()
        
    
    Returns the response character set.
        at         line 317
                            Response
    setStatus(int $statusCode)
        
    
    Sets the HTTP status code.
        at         line 332
                            int
    getStatus()
        
    
    Returns the HTTP status code.
        at         line 342
                            Headers
    getHeaders()
        
    
    Returns response header collection.
        at         line 352
                            Cookies
    getCookies()
        
    
    Returns response cookie collection.
        at         line 362
                            Response
    clear()
        
    
    Clears the response body, cookies and headers.
        at         line 378
                            Response
    reset()
        
    
    Resets the response.
        at         line 388
                            
    sendHeaders()
        
    
    Sends response headers.
        at         line 439
                            bool
    isCacheable()
        
    
    Is the response cacheable?
        at         line 464
                            Response
    enableCaching()
        
    
    Enables ETag response cache.
        at         line 476
                            Response
    disableCaching()
        
    
    Disables ETag response cache.
        at         line 488
                            Response
    enableCompression()
        
    
    Enables output compression.
        at         line 500
                            Response
    disableCompression()
        
    
    Disables output compression.
        at         line 510
                            
    send()
        
    
    Send output to browser.