id = $id; $this->value = $value; $this->style = $style; $this->events = array(); } function addEvent($event, $action) { $this->events[] = array($event, $action); } function getHtml() { $html = ""; $html .= "id\" name=\"$this->id\" class=\"entry\" type=\"password\" value=\"$this->value\" style=\"".$this->style."\" "; foreach($this->events as $event) { $html .= " ".$event[0]."=\"".$event[1]."\" "; } $html .= ">\n"; return $html; } } ?>