/** * Return XML representation of DiaComposite * * @return &xml.Node */ public function getNode() { $node = parent::getNode(); if (isset($this->value)) { $node->setAttribute('val', $this->value); } return $node; }
/** * Return XML representation of DiaComposite * * @return &xml.Node */ public function getNode() { $node = parent::getNode(); if (is_array($this->value) and sizeof($this->value) === 2 and is_array($this->value[0]) and sizeof($this->value[0]) === 2 and is_array($this->value[1]) and sizeof($this->value[1]) === 2) { $node->setAttribute('val', implode(',', $this->value[0]) . ';' . implode(',', $this->value[1])); } return $node; }
/** * Return XML representation of DiaComposite * * @return &xml.Node */ public function getNode() { $node = parent::getNode(); if (isset($this->value)) { $node->setContent('#' . $this->value . '#'); } else { $node->setContent('##'); } return $node; }
/** * Return XML representation of DiaComposite * * @return &xml.Node */ public function getNode() { $node = parent::getNode(); // TODO: the value should always be 'boolean'! if (isset($this->value)) { if (xp::typeOf($this->value) === 'boolean') { $node->setAttribute('val', $this->value ? 'true' : 'false'); } else { $node->setAttribute('val', $this->value === 'true' ? 'true' : 'false'); } } else { $node->setAttribute('val', 'false'); // default } return $node; }
/** * Returns the XML representation of this object * * @return &xml.Node */ public function getNode() { $Node = parent::getNode(); $Node->setAttribute('handle', $this->handle); $Node->setAttribute('to', $this->to); $Node->setAttribute('connection', $this->conn); return $Node; }
/** * Return XML representation of DiaComposite * * @return &xml.Node */ public function getNode() { $Node = parent::getNode(); $Node->setAttribute('family', $this->family); $Node->setAttribute('style', $this->style); $Node->setAttribute('name', $this->name); return $Node; }