From 810304159e2ba5a7b68aef45480ba822ec3fce2b 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)