0 follower

Interface Yiisoft\DataResponse\Formatter\XmlDataInterface

Interface provides methods used when formatting objects Yiisoft\DataResponse\Formatter\XmlFormatter 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 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 xmlData( ): array
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 xmlTagAttributes( ): array<string, string>
return array<string, string>

The attributes of the XML tag.

                public function xmlTagAttributes(): array;

            
xmlTagName() public abstract method

Returns a valid XML tag name https://www.w3.org/TR/REC-xml/#NT-NameStartChar to use when formatting an object as XML.

public abstract xmlTagName( ): string
return string

The XML tag name.

                public function xmlTagName(): string;