fixed return type of RendererInterface

This commit is contained in:
Dominik Liebler
2016-05-13 10:23:19 +02:00
parent 3fcf860cf3
commit acdef3f6e9
3 changed files with 5 additions and 9 deletions

View File

@ -10,17 +10,15 @@ class RenderInXml extends Decorator
/**
* render data as XML.
*
* @return mixed|string
* @return string
*/
public function renderData()
{
$output = $this->wrapped->renderData();
// do some fancy conversion to xml from array ...
$doc = new \DOMDocument();
foreach ($output as $key => $val) {
foreach ($this->wrapped->renderData() as $key => $val) {
$doc->appendChild($doc->createElement($key, $val));
}