<?php
require_once "SiemensXMLElement.php";

class IppTextBox extends SiemensXMLElement {

    const ConstraintANY = "ANY";
    const ConstraintNUMERIC = "NUMERIC";
    const ConstraintPASSWORD = "PASSWORD";
    
    const DefaultNULL = "NULL";
    const DefaultTEXT = "TEXT";
    const DefaultPHONENUMBER = "PHONENUMBER";
    
    const PasswordYES = "YES" ;
    const PasswordNO = "NO" ;
    
    const UneditableYES = "YES";
    const UneditableNO = "NO";
    
    private $type = null;
    private $delay = null;
    
    
    public function __construct(
    		$key,
    		$url,
    		$constraint = IppTextBox::ConstraintANY,
    		$maxSize = 255,
    		$password = IppTextBox::PasswordNO,
    		$default = IppTextBox::DefaultNULL,
    		$uneditable = IppTextBox::UneditableNO
    		) {
        
        $attributes = array();

        $attributes["MaxSize"] = $maxSize;
        $attributes["Constraint"] = $constraint;
        $attributes["Password"] = $password;
        $attributes["Default"] = $default;
        $attributes["Key"] = $key;
        $attributes["Uneditable"] = $uneditable;
        
        $this->setUrl($url);
        
        parent::__construct($attributes);
    }
    
    protected function name() {
        return "IppTextBox";
    }
    
}