addEntry('softkey1 label','Test'); # $configuration->addEntry('softkey1 type','xml'); # $configuration->setTriggerDestroyOnExit(); # $configuration->setBeep(); # $configuration->output(); # ######################################################################################################## require_once('AastraIPPhone.class.php'); require_once('AastraIPPhoneConfigurationEntry.class.php'); class AastraIPPhoneConfiguration extends AastraIPPhone { var $_type=''; var $_triggerDestroyOnExit=''; function addEntry($parameter, $value, $type='') { $this->_entries[] = new AastraIPPhoneConfigurationEntry($parameter, $value, $type); } function setTriggerDestroyOnExit() { $this->_triggerDestroyOnExit="yes"; } function setType($type) { $this->_type=$type; } function render() { # Beginning of root tag $out = "_beep=='yes') $out .= " Beep=\"yes\""; # TriggerDestroyOnExit if($this->_triggerDestroyOnExit=='yes') $out .= " triggerDestroyOnExit=\"yes\""; # Type if($this->_type!='') $out .= " setType=\"{$this->_type}\""; # End of root tag $out .= ">\n"; # Configuration Items if (isset($this->_entries) && is_array($this->_entries)) { foreach ($this->_entries as $entry) $out .= $entry->render(); } # End tag $out .= "\n"; # Return XML object return($out); } } ?>