public toXml ( boolean $returnAsDom = false, array &$known = null ) : DOMDocument | string | ||
$returnAsDom | boolean | optional Should it return DOMDocument object or plain xml string. If it's true it will return DOMDocument. |
$known | array | optional It's for internal usage |
리턴 | DOMDocument | string | Returns object converted into either XML string or DOMDocument, depends on returnAsDom option. |
public function toXml($returnAsDom = false, &$known = null)
{
//This method is supposed to be overridden where it's needed.
$dom = new \DOMDocument('1.0', 'UTF-8');
return $returnAsDom ? $dom : $dom->saveXML();
}