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

46 lines
1.1 KiB
PHP

<?php
################################################################################
# Aastra XML API Classes - AastraIPPhoneFormattedTextScreenEntry
# Copyright Aastra Telecom 2007
#
# Internal class for AastraIPPhoneFormattedTextScreen object.
################################################################################
class AastraIPPhoneFormattedTextScreenEntry extends AastraIPPhone {
var $_text;
var $_size;
var $_align;
var $_type;
function AastraIPPhoneFormattedTextScreenEntry($text, $size, $align, $type)
{
$this->_text=$text;
$this->_size=$size;
$this->_align=$align;
$this->_type=$type;
}
function render()
{
switch($this->_type)
{
case "normal":
$xml = "<Line";
if($this->_size!=NULL) $xml .= " Size=\"{$this->_size}\"";
if($this->_align!=NULL) $xml .= " Align=\"{$this->_align}\"";
$xml .= ">";
$xml .= $this->escape($this->_text)."</Line>\n";
break;
case "scrollstart":
$xml = "<Scroll Height=\"{$this->_size}\">\n";
break;
case "scrollend":
$xml = "</Scroll>\n";
break;
}
return($xml);
}
}
?>