Example #1
0
 /**
  * Find the feed logo url.
  *
  * @param SimpleXMLElement      $xml  Feed xml
  * @param \PicoFeed\Parser\Feed $feed Feed object
  */
 public function findFeedLogo(SimpleXMLElement $xml, Feed $feed)
 {
     $value = XmlParser::getXPathResult($xml, 'channel/image/url');
     $feed->setLogo(XmlParser::getValue($value));
 }
Example #2
0
 /**
  * Find the feed logo url.
  *
  * @param SimpleXMLElement      $xml  Feed xml
  * @param \PicoFeed\Parser\Feed $feed Feed object
  */
 public function findFeedLogo(SimpleXMLElement $xml, Feed $feed)
 {
     $logo = XmlParser::getXPathResult($xml, 'rss:image/rss:url', $this->namespaces) ?: XmlParser::getXPathResult($xml, 'image/url');
     $feed->setLogo(XmlParser::getValue($logo));
 }
Example #3
0
 /**
  * Find the feed logo url.
  *
  * @param SimpleXMLElement      $xml  Feed xml
  * @param \PicoFeed\Parser\Feed $feed Feed object
  */
 public function findFeedLogo(SimpleXMLElement $xml, Feed $feed)
 {
     $logo = XmlParser::getXPathResult($xml, 'atom:logo', $this->namespaces) ?: XmlParser::getXPathResult($xml, 'logo');
     $feed->setLogo(XmlParser::getValue($logo));
 }