]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/atomcategory.php
Opps, PEAR sucks. Need to call find() before fetch() ... :-(
[quix0rs-gnu-social.git] / lib / atomcategory.php
index 9763023f7589c151ed4e24c2cea51fa93f7e951b..e527877cb090347bdf064222369756dcaede3346 100644 (file)
@@ -59,6 +59,13 @@ class AtomCategory
     }
 
     function asString()
+    {
+        $xs = new XMLStringer();
+        $this->outputTo($xs);
+        return $xs->getString();
+    }
+
+    function outputTo($xo)
     {
         $attribs = array();
         if ($this->term !== null) {
@@ -70,8 +77,6 @@ class AtomCategory
         if ($this->label !== null) {
             $attribs['label'] = $this->label;
         }
-        $xs = new XMLStringer();
-        $xs->element('category', $attribs);
-        return $xs->getString();
+        $xo->element('category', $attribs);
     }
 }