]> git.wh0rd.org - tt-rss.git/blame - plugins/example_feed/init.php
remove $link
[tt-rss.git] / plugins / example_feed / init.php
CommitLineData
4412b877
AD
1<?php
2class 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
4412b877
AD
7 private $host;
8
d2a421e3 9 function about() {
7a866114
AD
10 return array(1.0,
11 "Example feed plugin",
de612e7a
AD
12 "fox",
13 true);
7a866114
AD
14 }
15
d2a421e3 16 function init($host) {
4412b877
AD
17 $this->host = $host;
18
19 $host->add_hook($host::HOOK_FEED_PARSED, $this);
20 }
21
22 function hook_feed_parsed($feed) {
23 _debug("I'm a little feed short and stout, here's my title: " . $feed->get_title());
24 _debug("... here's my link element: " . $feed->get_link());
25 }
26}
27?>