public function getHtml()
{
$html = '<input ';
foreach ($this->attributes as $name => $value) {
$html .= $name . '="' . $value . '" ';
}
if ($this->required) {
$html .= 'required="required" ';
}
$html .= 'type="' . $this->type . '" ';
$html .= 'name="' . $this->getName() . '" ';
if (($value = $this->getValue()) !== null && gettype($value) != 'object') {
$html .= 'value="' . htmlspecialchars($value) . '" ';
}
$html .= '/>';
return $html;
}