summaryrefslogtreecommitdiff
path: root/lib/atomnoticefeed.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-02-10 21:21:42 -0800
committerZach Copley <zach@status.net>2010-02-11 13:56:05 -0800
commitc8d5c8442fe6ce54f7f65d1d0eb4203b06c09583 (patch)
tree952b5e5d96035ce5834ba81e46b1a85ed5df94e6 /lib/atomnoticefeed.php
parente2c0f59414dd7e9a33ffbae7307b81a85c2c168b (diff)
Added some boilerplate class comments, etc.
Diffstat (limited to 'lib/atomnoticefeed.php')
-rw-r--r--lib/atomnoticefeed.php55
1 files changed, 54 insertions, 1 deletions
diff --git a/lib/atomnoticefeed.php b/lib/atomnoticefeed.php
index ce87ec9e6..a626ab549 100644
--- a/lib/atomnoticefeed.php
+++ b/lib/atomnoticefeed.php
@@ -1,5 +1,47 @@
<?php
+/**
+ * StatusNet, the distributed open-source microblogging tool
+ *
+ * Class for building and Atom feed from a collection of notices
+ *
+ * PHP version 5
+ *
+ * LICENCE: This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @category Feed
+ * @package StatusNet
+ * @author Zach Copley <zach@status.net>
+ * @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 for creating a feed that represents a collection of notices. Builds the
+ * feed in memory. Get the feed as a string with AtomNoticeFeed::getString().
+ *
+ * @category Feed
+ * @package StatusNet
+ * @author Zach Copley <zach@status.net>
+ * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
+ * @link http://status.net/
+ */
class AtomNoticeFeed extends Atom10Feed
{
function __construct($indent = true) {
@@ -29,6 +71,12 @@ class AtomNoticeFeed extends Atom10Feed
);
}
+ /**
+ * Add more than one Notice to the feed
+ *
+ * @param mixed $notices an array of Notice objects or handle
+ *
+ */
function addEntryFromNotices($notices)
{
if (is_array($notices)) {
@@ -42,9 +90,14 @@ class AtomNoticeFeed extends Atom10Feed
}
}
+ /**
+ * Add a single Notice to the feed
+ *
+ * @param Notice $notice a Notice to add
+ */
function addEntryFromNotice($notice)
{
$this->addEntryRaw($notice->asAtomEntry());
}
-} \ No newline at end of file
+}