_type = self::XMLRPC_TYPE_STRUCT; parent::__construct($value); } /** * Return the XML code that represent struct native MXL-RPC value * * @return string */ public function saveXML() { if (!$this->_as_xml) { // The XML code was not calculated yet $dom = new DOMDocument('1.0'); $value = $dom->appendChild($dom->createElement('value')); $struct = $value->appendChild($dom->createElement('struct')); if (is_array($this->_value)) { foreach ($this->_value as $name => $val) { /* @var $val Zend_XmlRpc_Value */ $member = $struct->appendChild($dom->createElement('member')); $member->appendChild($dom->createElement('name', $this->_escapeXmlEntities($name))); $member->appendChild($dom->importNode($val->getAsDOM(), 1)); } } $this->_as_dom = $value; $this->_as_xml = $this->_stripXmlDeclaration($dom); } return $this->_as_xml; } }