Exemplo n.º 1
0
Arquivo: rss.php Projeto: poef/ariadne
 public function parse($xml)
 {
     $dom = ar_xml::parse($xml);
     $channel = $dom->rss->channel[0];
     $this->bind($channel->title, 'title')->bind($channel->link, 'link')->bind($channel->description, 'description')->bind($channel->language, 'language')->bind($channel->copyright, 'copyright')->bind($channel->managingEditor, 'managingEditor')->bind($channel->webMaster, 'webMaster')->bind($channel->pubDate, 'pubDate')->bind($channel->lastBuildDate, 'lastBuildDate')->bind($channel->category, 'category')->bind($channel->generator, 'generator')->bind($channel->cloud->attributes, 'cloud', 'array')->bind($channel->ttl, 'ttl', 'int')->bind($channel->image->attributes, 'image', 'array')->bindAsArray($channel->item, 'items', array('ar_connect_rssClient', 'parseItem'))->bind($dom, 'rawXML', 'xml');
     return $this;
 }