]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/poco.php
Fix for schema_version checksum table when checking schemas before the table's been...
[quix0rs-gnu-social.git] / lib / poco.php
index 2157062b3798202b9c6a3da5b5b636a890ab515e..d7b082163ee21eb4199be57d17463f49f21f7fc5 100644 (file)
@@ -211,30 +211,34 @@ class PoCo
     function asString()
     {
         $xs = new XMLStringer(true);
-        $xs->element(
+        $this->outputTo($xs);
+        return $xs->getString();
+    }
+
+    function outputTo($xo)
+    {
+        $xo->element(
             'poco:preferredUsername',
             null,
             $this->preferredUsername
         );
 
-        $xs->element(
+        $xo->element(
             'poco:displayName',
             null,
             $this->displayName
         );
 
         if (!empty($this->note)) {
-            $xs->element('poco:note', null, common_xml_safe_str($this->note));
+            $xo->element('poco:note', null, common_xml_safe_str($this->note));
         }
 
         if (!empty($this->address)) {
-            $xs->raw($this->address->asString());
+            $this->address->outputTo($xo);
         }
 
         foreach ($this->urls as $url) {
-            $xs->raw($url->asString());
+            $url->outputTo($xo);
         }
-
-        return $xs->getString();
     }
 }