| @@ 28-38 (lines=11) @@ | ||
| 25 | $this->RSSFeed->handle_content_type(); |
|
| 26 | } |
|
| 27 | ||
| 28 | public function indexAction() |
|
| 29 | { |
|
| 30 | $rssPosts = $this->RSSFeed->get_items(0, 5); |
|
| 31 | ||
| 32 | $this->views->addString("This is the index route of rssreader"); |
|
| 33 | ||
| 34 | $this->views->add('rssreader/feed', [ |
|
| 35 | 'title' => 'Rss', |
|
| 36 | 'items' => $rssPosts |
|
| 37 | ]); |
|
| 38 | } |
|
| 39 | ||
| 40 | public function viewAction($noOfItems = 5) |
|
| 41 | { |
|
| @@ 40-48 (lines=9) @@ | ||
| 37 | ]); |
|
| 38 | } |
|
| 39 | ||
| 40 | public function viewAction($noOfItems = 5) |
|
| 41 | { |
|
| 42 | $rssPosts = $this->RSSFeed->get_items(0, $noOfItems); |
|
| 43 | ||
| 44 | $this->views->add('rssreader/feed', [ |
|
| 45 | 'title' => 'Rss', |
|
| 46 | 'items' => $rssPosts |
|
| 47 | ]); |
|
| 48 | } |
|
| 49 | ||
| 50 | } |
|
| 51 | ||