From c8d5c8442fe6ce54f7f65d1d0eb4203b06c09583 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Wed, 10 Feb 2010 21:21:42 -0800 Subject: Added some boilerplate class comments, etc. --- lib/atom10feed.php | 58 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 6 deletions(-) (limited to 'lib/atom10feed.php') diff --git a/lib/atom10feed.php b/lib/atom10feed.php index 01fc69072..a37f6521a 100644 --- a/lib/atom10feed.php +++ b/lib/atom10feed.php @@ -1,9 +1,51 @@ . + * + * @category Feed + * @package StatusNet + * @author Zach Copley + * @copyright 2010 StatusNet, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://status.net/ + */ + +if (!defined('STATUSNET') +{ + exit(1); +} class Atom10FeedException extends Exception { } +/** + * Class for building an Atom feed in memory. Get the finished doc + * as a string with Atom10Feed::getString(). + * + * @category Feed + * @package StatusNet + * @author Zach Copley + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://status.net/ + */ class Atom10Feed extends XMLStringer { public $xw; @@ -23,12 +65,11 @@ class Atom10Feed extends XMLStringer private $entries; /** - * undocumented function + * Constructor * - * @param array $entries an array of FeedItems + * @param boolean $indent flag to turn indenting on or off * * @return void - * */ function __construct($indent = true) { parent::__construct($indent); @@ -38,6 +79,14 @@ class Atom10Feed extends XMLStringer $this->addNamespace('xmlns', 'http://www.w3.org/2005/Atom'); } + /** + * Add another namespace to the feed + * + * @param string $namespace the namespace + * @param string $uri namspace uri + * + * @return void + */ function addNamespace($namespace, $uri) { $ns = array($namespace => $uri); @@ -172,6 +221,3 @@ class Atom10Feed extends XMLStringer } } - - - -- cgit v1.2.3-54-g00ecf