public function set_file(&$file)
{
if ($file instanceof SimplePie_File) {
$this->feed_url = $file->url;
$this->permanent_url = $this->feed_url;
$this->file =& $file;
return true;
}
return false;
}
public function createSimplePieObject($fileName) { $filePath = self::calcFixtureFilePath($fileName); $feed = new SimplePie(); $feed->set_file(new SimplePie_File($filePath)); $feed->set_cache_location(sfConfig::get('sf_cache_dir')); if (!@$feed->init()) { return false; } return $feed; }