class XmlResponse extends Response (View source)

Traits

Macroable
ResponseTrait

Properties

$headers
$options

Methods

__construct(mixed $data = null, int $status = 200, array $headers = [], array $options = [])

Constructor.

setContent(string|null $content)

Set the content on the response.

Details

__construct(mixed $data = null, int $status = 200, array $headers = [], array $options = [])

Constructor.

Parameters

mixed $data

The response data

int $status

The response status code

array $headers

An array of response headers

array $options

XmlResponse setContent(string|null $content)

Set the content on the response.

Parameters

string|null $content

Return Value

XmlResponse