You are here

public function ParserIcalDateTimeElement::merge in iCal feed parser 7

Same name and namespace in other branches
  1. 6.2 includes/ParserIcalFeedsParser.inc \ParserIcalDateTimeElement::merge()

Overridden merge method to combine two iCal date elements. Most of the heavy lifting still handled by parent merge method.

File

includes/ParserIcalFeedsParser.inc, line 75

Class

ParserIcalDateTimeElement
Overridden version of FeedsDateTimeElement that supports iCal specific parsing and repetition.

Code

public function merge(FeedsDateTimeElement $other) {
  $ret = parent::merge($other);
  if ($other instanceof FeedsIcalDateTimeElement && !$ret->repeat_vals && $other->repeat_vals) {
    $ret->repeat_vals = $other->repeat_vals;
  }
  return $ret;
}