summaryrefslogtreecommitdiffstats
path: root/lib/feedmapper.php
diff options
context:
space:
mode:
authorAlessandro Cosentino <cosenal@gmail.com>2012-05-28 14:27:18 -0400
committerAlessandro Cosentino <cosenal@gmail.com>2012-05-28 14:27:18 -0400
commit762b4d89bc0876d8d514a21bf22babcb012cf298 (patch)
treeb84a49d9edc109616c964b01d254dc7d81e597f9 /lib/feedmapper.php
parent8ae896cac3de17b97001850132a6f9ea3cc54d0d (diff)
decoupled fetcher and database mapper
Diffstat (limited to 'lib/feedmapper.php')
-rw-r--r--lib/feedmapper.php25
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/feedmapper.php b/lib/feedmapper.php
index 004e443f1..c0e0b03a5 100644
--- a/lib/feedmapper.php
+++ b/lib/feedmapper.php
@@ -28,31 +28,6 @@ class OC_News_FeedMapper {
const tableName = '*PREFIX*news_feeds';
/**
- * @brief Fetch a feed from remote
- * @param url remote url of the feed
- * @returns
- */
- public function fetch($url){
- $spfeed = new SimplePie_Core();
- $spfeed->set_feed_url( $url );
- $spfeed->enable_cache( false );
- $spfeed->init();
- $spfeed->handle_content_type();
- $title = $spfeed->get_title();
-
- $spitems = $spfeed->get_items();
- $items = array();
- foreach($spitems as $spitem) { //FIXME: maybe we can avoid this loop
- $itemUrl = $spitem->get_permalink();
- $itemTitle = $spitem->get_title();
- $items[] = new OC_News_Item($itemUrl, $itemTitle);
- }
-
- $feed = new OC_News_Feed($url, $title, $items);
- return $feed;
- }
-
- /**
* @brief Retrieve a feed from the database
* @param id The id of the feed in the database table.
* @returns