public function __get($strKey)
{
switch ($strKey) {
case 'value':
// Hide the Punycode format (see #2750)
if ($this->rgxp == 'url') {
return \Idna::decode($this->varValue);
} elseif ($this->rgxp == 'email' || $this->rgxp == 'friendly') {
return \Idna::decodeEmail($this->varValue);
} else {
return $this->varValue;
}
break;
case 'type':
if ($this->hideInput) {
return 'password';
}
// Use the HTML5 types (see #4138) but not the date, time and datetime types (see #5918)
switch ($this->rgxp) {
case 'digit':
// Allow floats (see #7257)
if (!isset($this->arrAttributes['step'])) {
$this->addAttribute('step', 'any');
}
// NO break; here
// NO break; here
case 'natural':
return 'number';
break;
case 'phone':
return 'tel';
break;
case 'email':
return 'email';
break;
case 'url':
return 'url';
break;
}
return 'text';
break;
default:
return parent::__get($strKey);
break;
}
}