Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
87 lines (54 sloc) 1.75 KB


Atomizer provides a friendly interface for managing RSS data, but it doesn't officially support Atom.


Atomizer is available for Codeigniter via Sparks.

Once you've got the spark set up, you can load it using:

$this->load->spark('atomizer/[version #]');

Once Atomizer is loaded, we can get on to more exciting things.

###Creating feeds

$info = array(
	'title' => 'my feed'

$items = array(
		'title' => 'my first entry',
		'description' => 'This is the first entry in my new feed'
		'title' => 'my second entry',
		'description' => 'This is the second entry in my new feed'

$feed = $this->atomizer->create( $info, $items );

###Adding items to a feed

$item = new AtomizerItem(array(
	'title' => 'my third feed entry',
	'description' => 'This is a new entry for my feed'

$feed->addItem( $item );

###(re)Mixing feeds

Two feeds may be combined using the convolve method.

$remix = $feed->convolve( $otherfeed, $info );

###Sorting feeds

The order of an RSS feed is time-agnostic, but applications may benefit from having data ordered by publishing time.


###Saving a feed as XML

header('Content-type: application/rss+xml');
echo $this->atomizer->save( $feed );

###Parsing feeds

$url = '';
$feed = $this->atomizer->load( file_get_contents( $url ) );

foreach( $feed->channels as $channel ) {

	$items = $channel->items;

	foreach( $items as $item ) {
		echo '<li>' . $item->title . '</li>';


RJ Zaworski


Atomizer is released under the JSON License. You can read the license here.