Свойство | Type | Description | |
---|---|---|---|
$headers | array | Array of headers to be sent | |
$output | string | The final output | |
$status | integer | The response status |
Méthode | Description | |
---|---|---|
__construct ( $output, $status = 200, $headers = [] ) | Create a new instance of the Response class | |
create ( $output, $status = 200, $headers = [] ) : object | Create a new instance of the Response class for chaining | |
json ( $output, $status = 200 ) : object | Creates a response with the output as JSON | |
redirect ( $uri, $status = 302 ) : object | Creates a response with a header to redirect | |
send ( ) | Sends the final headers cookies and output |
public __construct ( $output, $status = 200, $headers = [] ) |