Beispiel #1
0
 /**
  * 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);
 }
Beispiel #2
0
 /**
  * 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);
 }