Exemple #1
0
 /**
  * Check if the site url is correct
  *
  * @access public
  * @param  Feed    $feed          Feed object
  */
 public function checkSiteUrl(Feed $feed)
 {
     if ($feed->getSiteUrl() === '') {
         $feed->site_url = Url::base($feed->getFeedUrl());
     } else {
         $feed->site_url = Url::resolve($feed->getSiteUrl(), $this->fallback_url);
     }
 }
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)
 {
     $feed->id = $feed->getFeedUrl() ?: $feed->getSiteUrl();
 }