/** * Override IodefElement::xmlSerialize with some exceptions * for this Element and then call the parent serialize after. * @param SabreWriter $writer * @return void */ public function xmlSerialize(\Sabre\Xml\Writer $writer) { if ($this->attributes['rating'] != 'numeric') { $this->value = ''; } parent::xmlSerialize($writer); }
/** * Override IodefElement::xmlSerialize with some exceptions * for this Element and then call the parent serialize after. * @param SabreWriter $writer * @return void */ public function xmlSerialize(\Sabre\Xml\Writer $writer) { // offsetunit attribute is 'line' if not specified and offset attribute is set if ($this->attributes['offsetunit'] == '' && $this->attributes['offset'] != '') { $this->attributes['offsetunit'] = 'line'; } parent::xmlSerialize($writer); }