class XMLTemplate extends BaseTemplate
{
/**
* This function draws the content area of the page.
*/
public function drawPage()
{
//tell the browser we're html.
header("Content-type: text/xml; charset=UTF-8");
//start our header off right.
echo '' . "\n";
echo "\n";
//draw our errors...
if ($this->object->hasError())
$this->drawError();
//nope, what about status?.
else if ($this->object->hasStatus())
$this->drawStatus();
//finally we get to content!
else
$this->drawContent();
}
public function drawError()
{
echo "" . htmlentities($this->object->getError()) . "";
}
public function drawStatus()
{
$status = $this->object->getStatus();
foreach ($status AS $msg)
echo "" . htmlentities($msg) . "\n";
}
}
?>