59 lines
1.8 KiB
PHP
59 lines
1.8 KiB
PHP
<?php
|
|
|
|
########################################################################################################
|
|
# Aastra XML API Classes - AastraIPPhoneExecute
|
|
# Copyright Aastra Telecom 2007
|
|
#
|
|
# AastraIPPhoneExecute object.
|
|
#
|
|
# Public methods
|
|
#
|
|
# Inherited from AastraIPPhone
|
|
# output() to display the object
|
|
# generate() to return the object content
|
|
# setBeep() to enable a notification beep with the object (optional)
|
|
#
|
|
# Specific to the object
|
|
# setTriggerDestroyOnExit() to set the triggerDestroyOnExit tag to "yes" (optional)
|
|
# addEntry(url,interruptCall) to add an action to be executed.
|
|
#
|
|
# Example
|
|
# require_once('AastraIPPhoneExecute.class.php');
|
|
# $execute = new AastraIPPhoneExecute();
|
|
# $execute->addEntry('http://myserver.com/script.php?choice=2');
|
|
# $execute->addEntry('Command: Reset');
|
|
# $execute->output();
|
|
#
|
|
########################################################################################################
|
|
|
|
require_once('AastraIPPhone.class.php');
|
|
require_once('AastraIPPhoneExecuteEntry.class.php');
|
|
|
|
class AastraIPPhoneExecute extends AastraIPPhone {
|
|
var $_defaultIndex="";
|
|
var $_triggerDestroyOnExit="";
|
|
|
|
function addEntry($url,$interruptCall=NULL)
|
|
{
|
|
$this->_entries[] = new AastraIPPhoneExecuteEntry($url,$interruptCall);
|
|
}
|
|
|
|
function setTriggerDestroyOnExit()
|
|
{
|
|
$this->_triggerDestroyOnExit="yes";
|
|
}
|
|
|
|
function render()
|
|
{
|
|
$title = $this->escape($this->_title);
|
|
$out = "<AastraIPPhoneExecute";
|
|
if($this->_beep=='yes') $out .= " Beep=\"yes\"";
|
|
if($this->_triggerDestroyOnExit=='yes') $out .= " triggerDestroyOnExit=\"yes\"";
|
|
$out .= ">\n";
|
|
foreach ($this->_entries as $entry) $out .= $entry->render();
|
|
$out .= "</AastraIPPhoneExecute>\n";
|
|
return($out);
|
|
}
|
|
}
|
|
?>
|