src/FeedReader.php
public function read($url, $configuration = 'default')
    {
        // Setup the object
        $sp = new SimplePie();

        // Configure it
        if(($cache = $this->setup_cache_directory($configuration)) !== false)
        {
            // Enable caching, and set the folder
            $sp->enable_cache(true);
            $sp->set_cache_location($cache);
            $sp->set_cache_duration($this->read_config($configuration, 'cache.duration', 3600));
        }
        else
        {
            // Disable caching
            $sp->enable_cache(false);
        }
        
        // Whether or not to force the feed reading
        $sp->force_feed($this->read_config($configuration, 'force-feed', false));

        // Should we be ordering the feed by date?
        $sp->enable_order_by_date($this->read_config($configuration, 'order-by-date', false));

        // Set the feed URL
        $sp->set_feed_url($url);

        // Grab it
        $sp->init();

        // We are done, so return it
        return $sp;
    }
public function read($url, $configuration = 'default')
    {
        // Setup the object
        $sp = new SimplePie();

        // Configure it
        if(($cache = $this->setup_cache_directory($configuration)) !== false)
        {
            // Enable caching, and set the folder
            $sp->enable_cache(true);
            $sp->set_cache_location($cache);
            $sp->set_cache_duration($this->read_config($configuration, 'cache.duration', 3600));
        }
        else
        {
            // Disable caching
            $sp->enable_cache(false);
        }
        
        // Whether or not to force the feed reading
        $sp->force_feed($this->read_config($configuration, 'force-feed', false));

        // Should we be ordering the feed by date?
        $sp->enable_order_by_date($this->read_config($configuration, 'order-by-date', false));

        // Set the feed URL
        $sp->set_feed_url($url);

        // Grab it
        $sp->init();

        // We are done, so return it
        return $sp;
    }
public function read ( $ url , $ configuration = 'default' ) { // Setup the object $ sp = new SimplePie ( ) ; // Configure it if ( ( $ cache = $ this -> setup_cache_directory ( $ configuration ) ) !== false ) { // Enable caching, and set the folder $ sp -> enable_cache ( true ) ; $ sp -> set_cache_location ( $ cache ) ; $ sp -> set_cache_duration ( $ this -> read_config ( $ configuration , 'cache.duration' , 3600 ) ) ; } else { // Disable caching $ sp -> enable_cache ( false ) ; } // Whether or not to force the feed reading $ sp -> force_feed ( $ this -> read_config ( $ configuration , 'force-feed' , false ) ) ; // Should we be ordering the feed by date? $ sp -> enable_order_by_date ( $ this -> read_config ( $ configuration , 'order-by-date' , false ) ) ; // Set the feed URL $ sp -> set_feed_url ( $ url ) ; // Grab it $ sp -> init ( ) ; // We are done, so return it return $ sp ; }
Used to parse an RSS feed.

@return \SimplePie
Used to parse an RSS feed .