symfony-bundle rss-bundle
Enables integration of the RSS-PHP library into symfony2 projects.
rockbee/rss-bundle
Enables integration of the RSS-PHP library into symfony2 projects.
- Wednesday, May 8, 2013
- by hugomn
- Repository
- 3 Watchers
- 0 Stars
- 4,493 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 5 Forks
- 0 Open issues
- 1 Versions
- 2 % Grown
Introduction
This Bundle enables integration of the RSS-PHP library into your symfony2 project.
RSS_PHP: http://rssphp.net/, (*1)
Installation
Downlad rssphp and to your vendor/
dir and configure the app, just have to set up your config with the path to the 'rss.php' file., (*2)
Example in your config.yml
:, (*3)
iga_rss:
file: %kernel.root_dir%/../vendor/rssphp/rss.php
Usage
Now, you have a service called "iga_rss.rss" that loads the rss_php class.
Code sample in a controller:, (*4)
$rss = $this->get('iga_rss.rss');
$rss->load('http://www.elpais.com/rss/feed.html?feedId=1022');
$items = $rss->getItems();