function handler_rss(PlPage $page, PlUser $user) { $this->load('feed.inc.php'); $feed = new EventFeed(); return $feed->run($page, $user); }
/** * Create a new EventFeed. * * @access public * @return Object instance of EventFeed class */ public function newEventFeed(array $arr_ = NULL) { $newEvent = new EventFeed(NULL, self::CHARSET, self::REPLACE_ACCENT); if ($arr_) { if (count($arr_) > 0) { if (isset($arr_['title'])) { if (FeedValidator::isNull($arr_['title']) == FALSE) { $newEvent->setTitle($arr_['title']); } } if (isset($arr_['uri'])) { if (FeedValidator::isNull($arr_['uri']) == FALSE) { $newEvent->setUri($arr_['uri']); } } if (isset($arr_['published'])) { if (FeedValidator::isValidDate($arr_['published']) == TRUE) { $newEvent->setPublished($arr_['published']); } else { $newEvent->setPublished(self::getISODate()); } } if (isset($arr_['updated'])) { if (FeedValidator::isValidDate($arr_['updated']) == TRUE) { $newEvent->setUpdated($arr_['updated']); } } if (isset($arr_['access'])) { if (FeedValidator::isNull($arr_['access']) == FALSE) { $newEvent->setAccess($arr_['access']); } else { $newEvent->setAccess(EssDTD::ACCESS_PUBLIC); } } if (isset($arr_['description'])) { if (FeedValidator::isNull($arr_['description']) == FALSE) { $newEvent->setDescription($arr_['description']); } } if (isset($arr_['tags'])) { if (count($arr_['tags']) > 0) { $newEvent->setTags($arr_['tags']); } } } } return $newEvent; }