cvs: pearweb /include/Damblan RSS.php

From: Date: Tue, 09 Sep 2003 16:10:15 +0000
Subject: cvs: pearweb /include/Damblan RSS.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-12583@lists.php.net to get a copy of this message
mj Tue Sep 9 12:10:15 2003 EDT Modified files: /pearweb/include/Damblan RSS.php Log: * Unify the API a bit Index: pearweb/include/Damblan/RSS.php diff -u pearweb/include/Damblan/RSS.php:1.2 pearweb/include/Damblan/RSS.php:1.3 --- pearweb/include/Damblan/RSS.php:1.2 Tue Sep 9 12:00:45 2003 +++ pearweb/include/Damblan/RSS.php Tue Sep 9 12:10:15 2003 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Author: Martin Jansen <mj@php.net> | +----------------------------------------------------------------------+ - $Id: RSS.php,v 1.2 2003/09/09 16:00:45 mj Exp $ + $Id: RSS.php,v 1.3 2003/09/09 16:10:15 mj Exp $ */ require_once "PEAR.php"; @@ -26,7 +26,7 @@ * * @author Martin Jansen <mj@php.net> * @package Damblan - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ */ class Damblan_RSS { @@ -35,7 +35,7 @@ * * @access public * @param string Type - * @return object Instance of Damblan_RSS_* or PEAR_Error + * @return mixed String or PEAR_Error */ function getFeed($type) { if ($type != "latest") { @@ -70,7 +70,7 @@ Damblan_RSS_Cache::write($cache, $rss_obj->toString()); } - return $rss_obj; + return $rss_obj->toString(); } else { PEAR::raiseError("The requested URL " . $_SERVER['REQUEST_URI'] . " was not found on this server."); } @@ -91,12 +91,7 @@ } else { header("Content-Type: text/xml"); print "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n"; - - if (is_object($ret)) { - print $ret->toString(); - } else { - print $ret; - } + print $ret; } } }

« previous php.pear.cvs (#12583) next »