Example #1
0
 /**
  * Find the site url.
  *
  * @param SimpleXMLElement      $xml  Feed xml
  * @param \PicoFeed\Parser\Feed $feed Feed object
  */
 public function findSiteUrl(SimpleXMLElement $xml, Feed $feed)
 {
     $value = XmlParser::getXPathResult($xml, 'channel/link');
     $feed->setSiteUrl(XmlParser::getValue($value));
 }
Example #2
0
 /**
  * Find the site url.
  *
  * @param SimpleXMLElement      $xml  Feed xml
  * @param \PicoFeed\Parser\Feed $feed Feed object
  */
 public function findSiteUrl(SimpleXMLElement $xml, Feed $feed)
 {
     $value = XmlParser::getXPathResult($xml, 'rss:channel/rss:link', $this->namespaces) ?: XmlParser::getXPathResult($xml, 'channel/link') ?: $xml->channel->link;
     $feed->setSiteUrl(XmlParser::getValue($value));
 }
Example #3
0
 /**
  * Find the site url.
  *
  * @param SimpleXMLElement      $xml  Feed xml
  * @param \PicoFeed\Parser\Feed $feed Feed object
  */
 public function findSiteUrl(SimpleXMLElement $xml, Feed $feed)
 {
     $feed->setSiteUrl($this->getUrl($xml, 'alternate', true));
 }