<?php
require_once "SiemensXMLElement.php";

class IppKey extends SiemensXMLElement {

	const KeypadTrue = "YES";
	const KeypadFalse = "NO";
	
	const SendKeyTrue = "YES";
	const SendKeyFalse = "NO";
	
	const UrlKeyDigit = "digit";
	
	const TermKeyTest = '*';
	
	const BufferKeysTrue = 'YES';
	const BufferKeysFalse = 'FALSE';
	const BufferKeysSubsequent = 'SUBSEQUENT';
	
// 	const BufferLengthDefault = '20';
	
	private $keypad = null;
	private $sendkeys = null;
	private $urlkey = null;
		
	public function __construct(
			$keypad = IppKey::KeyPadFalse,
			$sendkeys = IppKey::SendKeyFalse,
			$urlkey = IppKey::UrlKeyDigit,
			$termKey = IppKey::TermKeyTest,
			$bufferKeys = IppKey::BufferKeysTrue
// 			$length = IppKey::BufferLengthDefault
			) {
		
		$attributes = array();
		$attributes["Keypad"] = $keypad;
		$attributes["SendKeys"] = $sendkeys;
		$attributes["UrlKey"] = $urlkey;
		$attributes["TermKey"] = $termKey;
		$attributes["BufferKeys"] = $bufferKeys;
// 		$attributes["BufferLength"] = $length;
		
		
		parent::__construct($attributes);
	}
	
	public function renderXMLBeforeChildsHook(xmlWriter &$xw) {
		//$xw->text($this->text);
	}
	
	
	protected function name() {
		return "IppKey";
	}
	
}