From df18ba2fd9478693d3ed3ec3ecc8302e90596619 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 2 Jan 2011 15:21:56 -0800 Subject: [PATCH] let callers pass in an XMLOutputter to output to --- lib/activity.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/activity.php b/lib/activity.php index 8d7ae1540b..b77d53427c 100644 --- a/lib/activity.php +++ b/lib/activity.php @@ -322,6 +322,7 @@ class Activity * * @return DOMElement Atom entry */ + function toAtomEntry() { return null; @@ -330,7 +331,12 @@ class Activity function asString($namespace=false, $author=true, $source=false) { $xs = new XMLStringer(true); + $this->outputTo($xs, $namespace, $author, $source); + return $xs->getString(); + } + function outputTo($xs, $namespace=false, $author=true, $source=false) + { if ($namespace) { $attrs = array('xmlns' => 'http://www.w3.org/2005/Atom', 'xmlns:thr' => 'http://purl.org/syndication/thread/1.0', @@ -518,9 +524,7 @@ class Activity $xs->elementEnd('entry'); - $str = $xs->getString(); - - return $str; + return; } private function _child($element, $tag, $namespace=self::SPEC) -- 2.39.5