2017 © Pedro Peláez
 

symfony-bundle rss-client-bundle

This Bundle provides a way to get rss feeds friendly.

image

desarrolla2/rss-client-bundle

This Bundle provides a way to get rss feeds friendly.

  • Monday, November 25, 2013
  • by desarrolla2
  • Repository
  • 1 Watchers
  • 10 Stars
  • 13,054 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 4 Forks
  • 1 Open issues
  • 8 Versions
  • 1 % Grown

The README.md

RSSClientBundle

knpbundles.com, (*1)

Latest Stable Version Total Downloads Build Status, (*2)

Service for provide RSS client in your website, you can automatically add content to your site from your favorite information providers., (*3)

Bundle Installation

Get the bundle

Add to your /composer.json file :, (*4)

``` json "require": { ...
"desarrolla2/rss-client-bundle": "2.*" }, ````, (*5)

And make, (*6)

``` bash composer update, (*7)


### Register the bundle ``` php // app/AppKernel.php <?php public function registerBundles() { return array( // ... new Desarrolla2\Bundle\RSSClientBundle\RSSClientBundle(), ); }

Using RSS Bundle

Configure providers

You need edit your config.yml and add the rss routes you want to get., (*8)

``` yml, (*9)

app/config/config.yml

rss_client: cache: ttl: 3600 # This is the default channels:
channel_name1: - 'http://www.osukaru.es/feed/' - 'http://desarrolla2.com/feed/', (*10)

  channel_name2:
     - 'http://feeds.feedburner.com/symfony/blog'
     - 'http://www.symfony.es/feed/'

The cache option is completely optional. If not specified the shown default take effect. #### Optionally: configure custom processors If you want to use [custom processors](https://github.com/desarrolla2/RSSClient/blob/master/doc/custom-process.md) to extract additional information from a feed, also add the "processors" key pointing to services that implement the ```ProcessorInterface```. ```yml rss_client: processors: ["my_service_id", "my_other_service_id"]

In your controller

Retrieve the service and fetch the content., (*11)

``` php <?php, (*12)

class NewsController extends Controller {, (*13)

/**
 * Renders latest news
 *
 * @return array
 * @Route("/noticias", name="news_index")
 * @Template()
 */
public function indexAction()
{
    $this->client = $this->get('rss_client');

    return array(
        'feeds'   => $this->client->fetch('channel_name1'),
    );
}

}, (*14)


### In your view Render the content for your users ``` html {% block content %} <section> {% for feed in feeds %} <article> <header> <a href="{{ feed.link }}" target="_blank">{{ feed.title }}</a> <time>{{ feed.pubDate | date('d/m/Y H:i') }}</time> </header> <p>{{ feed | raw }}</p> </article> {% else %} <p>Not news :(</p> {% endfor %} </section> {% endblock %}

Contact

You can contact with me on twitter., (*15)

More Info

See RSSClient., (*16)

The Versions

25/11 2013

dev-master

9999999-dev

This Bundle provides a way to get rss feeds friendly.

  Sources   Download

MIT

The Requires

 

rss client

05/08 2013

v2.0.4

2.0.4.0

This Bundle provides a way to get rss feeds friendly.

  Sources   Download

MIT

The Requires

 

rss client

31/07 2013

v2.0.3

2.0.3.0

This Bundle provides a way to get rss feeds friendly.

  Sources   Download

MIT

The Requires

 

rss client

29/05 2013

v2.0.2

2.0.2.0

This Bundle provides a way to get rss feeds friendly.

  Sources   Download

MIT

The Requires

 

rss client

26/04 2013

v2.0.1

2.0.1.0

This Bundle provides a way to get rss feeds friendly.

  Sources   Download

MIT

The Requires

 

rss client

28/03 2013

v2.0.0

2.0.0.0

This Bundle provides a way to get rss feeds friendly.

  Sources   Download

MIT

The Requires

 

rss client

13/12 2012

v1.0.2

1.0.2.0

This Bundle provides a way to get rss feeds friendly.

  Sources   Download

MIT

The Requires

 

rss client

12/12 2012

v1.0.1

1.0.1.0

This Bundle provides a way to get rss feeds friendly.

  Sources   Download

MIT

The Requires

 

rss client