Back to RssParser class

Method handleSkipDays

protected void
handleSkipDays
(\Joomla\CMS\Feed\Feed $feed, \SimpleXMLElement $el)
Method to handle the `<skipDays>` 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: RssParser
Project: Joomla

Method handleSkipDays - Source code

/**
 * Method to handle the `<skipDays>` 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 handleSkipDays(Feed $feed, \SimpleXMLElement $el)
{
    // Initialise the array.
    $days = array();
    // Add all of the day values from the feed to the array.
    foreach ($el->day as $day) {
        $days[] = (string) $day;
    }
    $feed->skipDays = $days;
}