Renders data (usually the result of a controller action) and generates a string
representation of it, based on the type of expected output.
public static render ( object $response, mixed $data = null, array $options = [] ) : object | ||
$response | object | A Response object into which the operation will be rendered. The content of the render operation will be assigned to the `$body` property of the object, the `'Content-Type'` header will be set accordingly, and it will be returned. |
$data | mixed | The data (usually an associative array) to be rendered in the response. |
$options | array | Any options specific to the response being rendered, such as type information, keys (i.e. controller and action) used to generate template paths, etc. |
return | object | Returns a modified `Response` object with headers and body defined. |