PHP code example of desarrolla2 / rss-client-bundle

1. Go to this page and download the library: Download desarrolla2/rss-client-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

desarrolla2 / rss-client-bundle example snippets

 php
// app/AppKernel.php


  public function registerBundles()
  {
    return array(
      // ...
      new Desarrolla2\Bundle\RSSClientBundle\RSSClientBundle(),
      );
  }
 php


class NewsController extends Controller
{

    /**
     * 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'),
        );
    }

}