示例#1
0
 public function load($filename)
 {
     $filename = sprintf('%s/%s', $this->basePath, $filename);
     if (file_exists($filename)) {
         return parent::load($this->getContent($filename));
     } else {
         return new Feed(array('class' => 'Nekland\\Bundle\\FeedBundle\\Item\\GenericItem'));
     }
 }
示例#2
0
 /**
  * @When /^I load the string$/
  */
 public function iLoadTheString()
 {
     $this->loader = new \Nekland\Bundle\FeedBundle\Loader\RssLoader();
     $this->feed = $this->loader->load($this->xml);
 }