コード例 #1
0
ファイル: LoaderTest.php プロジェクト: pscheit/psc-cms
 public function testRSSLoad()
 {
     $loader = new Loader();
     $root = $loader->process($this->getFile('episodes.xml')->getContents());
     $this->assertInstanceOf('SimpleXMLElement', $root);
     $this->assertEquals('rss', $root->getName());
 }
コード例 #2
0
ファイル: RssReader.php プロジェクト: pscheit/psc-cms
 public function init()
 {
     if (!$this->init) {
         $this->xml = $this->xmlLoader->process($this->getURLContents());
         if ($this->xml === FALSE) {
             throw new Exception('XML konnte nicht geparsed werden. Fehlerhafter Content in URL. ' . $this->url . ' ' . mb_substr($content, 0, 200));
         }
     }
 }