SimplePie 1.3.1 is now available. Upgrade now!

SimplePie Documentation.  Learn how to use this thing.  It's way better than going to school.

You are here: Documentation » API Reference » SimplePie » set_file()

set_file()

Description

class SimplePie {
	set_file ( object &$file )
}

Allows you to use SimplePie_File in a custom way, then use set_file() to tell SimplePie to use it.

:!: NOTE: If you pass a feed to SimplePie this way, SimplePie doesn't do any caching. You'll need to manage caching yourself.

Availability

  • Available since SimplePie 1.0.

Parameters

file

An instance of the SimplePie_File object.

Examples

Use a custom instance of the SimplePie_File object

$file = new SimplePie_File('http://simplepie.org/blog/feed/');
 
$feed = new SimplePie();
$feed->set_file($file);
$feed->init();
$feed->handle_content_type();
echo $feed->get_title();

See Also


reference/simplepie/set_file.txt · Last modified: 2011/03/05 19:56 (external edit)