XML
Less than 1 minute
XML
XML response class.
class XML extends \Hazaar\Controller\Response\ResponseThis response type encapsulates an {@see Element} document and emits it as XML over HTTP with a text/xml content type. It validates assigned payloads to ensure only framework XML element instances are accepted.
Properties
xmlContent
public Element $xmlContentMethods
__construct
Create a new XML response.
public __construct(?Element $content, int $status = 200): voidParameters
| Parameter | Type | Description |
|---|---|---|
$content | Element | optional XML document payload |
$status | int | HTTP status code |
content
Set XML payload content for the response.
public content(mixed $content): selfParameters
| Parameter | Type | Description |
|---|---|---|
$content | mixed | XML payload expected to be an {@see Element} instance |
getContent
Render and return XML response content.
public getContent(): stringGenerated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:24 +0000