0 follower

Interface Yiisoft\DataResponse\Formatter\XmlDataInterface

XmlFormatDataInterface provides methods used when formatting objects {@see XmlDataResponseFormatter} as XML data.

Public Methods

Hide inherited 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

Hide inherited methods

xmlData() public abstract method

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;

            
xmlTagAttributes() public abstract method

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;

            
xmlTagName() public abstract method

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;