Exemple #1
0
 /**
  * Find the feed id.
  *
  * @param SimpleXMLElement      $xml  Feed xml
  * @param \PicoFeed\Parser\Feed $feed Feed object
  */
 public function findFeedId(SimpleXMLElement $xml, Feed $feed)
 {
     $feed->setId($feed->getFeedUrl() ?: $feed->getSiteUrl());
 }
Exemple #2
0
 /**
  * Find the feed id.
  *
  * @param SimpleXMLElement      $xml  Feed xml
  * @param \PicoFeed\Parser\Feed $feed Feed object
  */
 public function findFeedId(SimpleXMLElement $xml, Feed $feed)
 {
     $id = XmlParser::getXPathResult($xml, 'atom:id', $this->namespaces) ?: XmlParser::getXPathResult($xml, 'id');
     $feed->setId(XmlParser::getValue($id));
 }