/** * 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)); }
/** * 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)); }
/** * 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)); }