<?php

require_once "XmlScreen.php";

class XmlMenuScreen extends XmlScreen
{

    public function __construct($attributes = array())
    {
        parent::__construct("TiptelIPPhoneTextMenu", $attributes);
    }

    public function addMenuItem($label, $URI, $attrs, $number = "")
    {
        $this->xw->startElement("MenuItem");
        $this->xw->writeElement("Prompt", $label);

        if ($URI != "") {
            $this->xw->writeElement("URI", $URI);
        }
        if ($number != "") {
            $this->xw->writeElement("Dial", $number);
        }
        if ($attrs != "") {
            $this->xw->writeElement("Selection", "&" . $attrs);
        }
        $this->xw->endElement();
    }
}
