Interface Yiisoft\DataResponse\Formatter\XmlDataInterface
XmlFormatDataInterface provides methods used when formatting objects {@see XmlDataResponseFormatter} as XML data.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| xmlData() | Returns an array of data to format as XML. | Yiisoft\DataResponse\Formatter\XmlDataInterface |
| xmlTagAttributes() | Returns an array of attributes for the XML tag. | Yiisoft\DataResponse\Formatter\XmlDataInterface |
| xmlTagName() | Returns a valid XML tag name {@link https://www.w3.org/TR/REC-xml/#NT-NameStartChar} to use when formatting an object as XML. | Yiisoft\DataResponse\Formatter\XmlDataInterface |
Method Details
Returns an array of data to format as XML.
The data can be any scalar values, instances of XmlDataInterface,
and nested arrays of any level consisting of the above values.
| public abstract array xmlData ( ) | ||
| return | array |
The data to format as XML. |
|---|---|---|
public function xmlData(): array;
Returns an array of attributes for the XML tag.
The array key is the attribute name, and the value is the attribute value.
| public abstract array<string, string> xmlTagAttributes ( ) | ||
| return | array<string, string> |
The attributes of the XML tag. |
|---|---|---|
public function xmlTagAttributes(): array;
Returns a valid XML tag name {@link https://www.w3.org/TR/REC-xml/#NT-NameStartChar} to use when formatting an object as XML.
| public abstract string xmlTagName ( ) | ||
| return | string |
The XML tag name. |
|---|---|---|
public function xmlTagName(): string;
Signup or Login in order to comment.