attributes = $attributes; } public function setAttributes($attributes) { $this->attributes = $attributes; } public function getAttributes() { return $this->attributes; } public function writeXML(\XMLWriter $xmlWriter) { $xmlWriter->startELement(Constants::MESSAGE_ATTRIBUTES); if ($this->attributes != NULL) { if (is_array($this->attributes)) { foreach ($this->attributes as $subAttributes) { $subAttributes->writeXML($xmlWriter); } } else { $this->attributes->writeXML($xmlWriter); } } $xmlWriter->endElement(); } } ?>