Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
The purpose of this Symfony plugin is to facilitate the use of SimplePie within a project.
PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test/unit Unit test
LICENSE
README
genpkgxml.php
package.xml

README

# amSimplePiePlugin

The purpose of this plugin is to facilitate the use of SimplePie
within a Symfony project:

* it allows you to autoload the SimplePie class
* it uses the Symfony cache directory


## Installation

### Install the plugin

    php symfony plugin:install amSimplePiePlugin

### Clear you cache

    php symfony cc


## Using the plugin

``new amSimplePie()`` has the same behavior as ``new SimplePie()``,
without the ``$cache_location`` parameter.

    $am_sp = new amSimplePie();
    $sp = $am_sp->getSP(); // SimplePie object ready for use
    $sp->set_feed_url('http://rss.slashdot.org/Slashdot/slashdot');
    $sp->set_cache_duration(3600);
    $sp->init();
    $sp->handle_content_type();
    foreach ($sp->get_items()) ...

OR

    $am_sp = new amSimplePie('http://rss.slashdot.org/Slashdot/slashdot', 3600);
    $sp = $am_sp->getSP();
    foreach ($sp->get_items()) ...

NOTE: SimplePie 1.x does not work well when the ``E_STRICT`` error reporting
level is activated. I advise you to disable it on the fly while you are
using SimplePie.


Copyright 2008-2009 [Theodo](http://www.theodo.fr/)

Something went wrong with that request. Please try again.