Back to AtomParser class

Method handleAuthor

protected void
handleAuthor
(\Joomla\CMS\Feed\Feed $feed, \SimpleXMLElement $el)
Method to handle the `<author>` element for the feed.
Parameters
  • \Joomla\CMS\Feed\Feed $feed The Feed object being built from the parsed feed.
  • \SimpleXMLElement $el The current XML element object to handle.
Returns
  • void
Since
  • 3.1.4
Class: AtomParser
Project: Joomla

Method handleAuthor - Source code

/**
 * Method to handle the `<author>` element for the feed.
 *
 * @param   Feed               $feed  The Feed object being built from the parsed feed.
 * @param   \SimpleXMLElement  $el    The current XML element object to handle.
 *
 * @return  void
 *
 * @since   3.1.4
 */
protected function handleAuthor(Feed $feed, \SimpleXMLElement $el)
{
    // Set the author information from the XML element.
    $feed->setAuthor($this->inputFilter->clean((string) $el->name, 'html'), filter_var((string) $el->email, FILTER_VALIDATE_EMAIL), filter_var((string) $el->uri, FILTER_VALIDATE_URL));
}