Example #1
0
 /**
  * Find the item title.
  *
  * @param SimpleXMLElement      $entry Feed item
  * @param \PicoFeed\Parser\Item $item  Item object
  */
 public function findItemTitle(SimpleXMLElement $entry, Item $item)
 {
     $title = XmlParser::getXPathResult($entry, 'rss:title', $this->namespaces) ?: XmlParser::getXPathResult($entry, 'title') ?: $entry->title;
     $item->setTitle(Filter::stripWhiteSpace(XmlParser::getValue($title)) ?: $item->getUrl());
 }
Example #2
0
 /**
  * Find the item title.
  *
  * @param SimpleXMLElement      $entry Feed item
  * @param \PicoFeed\Parser\Item $item  Item object
  */
 public function findItemTitle(SimpleXMLElement $entry, Item $item)
 {
     $value = XmlParser::getXPathResult($entry, 'title');
     $item->setTitle(Filter::stripWhiteSpace(XmlParser::getValue($value)) ?: $item->getUrl());
 }