diff options
author | Alessandro Cosentino <cosenal@gmail.com> | 2012-05-26 15:14:37 -0400 |
---|---|---|
committer | Alessandro Cosentino <cosenal@gmail.com> | 2012-05-26 15:14:37 -0400 |
commit | 6e91029b210cea92adc3534d9d77e008ced6e99d (patch) | |
tree | 16422cd4f8d300cbf0c804ccfb8d96cb6488e2e8 /templates | |
parent | d8a193119f442c92bd47f150d149a5d1caf44a7e (diff) |
create opmlimporter class
Diffstat (limited to 'templates')
-rw-r--r-- | templates/main.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/main.php b/templates/main.php index fc2631412..ec5a61b35 100644 --- a/templates/main.php +++ b/templates/main.php @@ -4,10 +4,14 @@ $mapper = new OC_News_FeedMapper(); $feed = $mapper->fetch( 'http://algorithmsforthekitchen.com/blog/?feed=rss2' ); echo "<br>" . $feed->getTitle() . "<br>"; $mapper->insert($feed); -$feed = $mapper->find($feed->getId()); +$feed = $mapper->findWithItems($feed->getId()); echo "<br>" . $feed->getTitle() . "<br>"; $items = $feed->getItems(); +foreach($items as $item) { + echo $item->getTitle(); +} + $feed2 = $mapper->findWithItems(45); echo "<br>" . $feed2->getTitle() . "<br>"; |