Files
aastra-xml-php/php_classes/AastraIPPhoneTextMenuEntry.class.php
2018-02-15 22:59:05 +01:00

47 lines
1.2 KiB
PHP

<?php
################################################################################
# Aastra XML API Classes - AastraIPPhoneTextMenuEntry
# Copyright Aastra Telecom 2007
#
# Internal class for AastraIPPhoneTextMenu object.
################################################################################
class AastraIPPhoneTextMenuEntry extends AastraIPPhone {
var $_name;
var $_url;
var $_selection;
var $_icon;
var $_dial;
function AastraIPPhoneTextMenuEntry($name, $url, $selection, $icon, $dial)
{
$this->_name=$name;
$this->_url=$url;
$this->_selection=$selection;
$this->_icon=$icon;
$this->_dial=$dial;
}
function getName()
{
return($this->_name);
}
function render()
{
$name = $this->escape($this->_name);
$url = $this->escape($this->_url);
$selection = $this->escape($this->_selection);
$icon=$this->_icon;
$xml = "<MenuItem";
if($icon!=NULL) $xml .= " icon=\"{$icon}\"";
$xml .= ">\n<Prompt>{$name}</Prompt>\n<URI>{$url}</URI>\n";
if($selection!=NULL) $xml .= "<Selection>{$selection}</Selection>\n";
if($this->_dial!=NULL) $xml .= "<Dial>{$this->_dial}</Dial>\n";
$xml .= "</MenuItem>\n";
return($xml);
}
}
?>