set_file() public method

Set an instance of {@see SimplePie_File} to use as a feed
public set_file ( &$file ) : boolean
return boolean True on success, false on failure
コード例 #1
0
 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;
 }
コード例 #2
0
ファイル: functions.php プロジェクト: patrickmj/FeedImporter
 function test()
 {
     $feed = new SimplePie();
     $feed->set_file($this->data['file']);
     $feed->enable_cache(false);
     $feed->init();
     $this->result = $feed->get_link();
 }