]> git.wh0rd.org - tt-rss.git/blob - plugins/example_feed/example_feed.php
26f392bd78ff1bf4df9da73499fab9dac647c547
[tt-rss.git] / plugins / example_feed / example_feed.php
1 <?php
2 class Example_Feed extends Plugin {
3
4 // Demonstrates how to query data from the parsed feed object (SimplePie)
5 // don't enable unless debugging feed through f D hotkey or manually.
6
7 private $link;
8 private $host;
9
10 function __construct($host) {
11 $this->link = $host->get_link();
12 $this->host = $host;
13
14 $host->add_hook($host::HOOK_FEED_PARSED, $this);
15 }
16
17 function hook_feed_parsed($feed) {
18 _debug("I'm a little feed short and stout, here's my title: " . $feed->get_title());
19 _debug("... here's my link element: " . $feed->get_link());
20 }
21 }
22 ?>