/**
* Method to set certain otherwise inaccessible properties of the form field object.
*
* @param string $name The property name for which to set the value.
* @param mixed $value The value of the property.
*
* @return void
*
* @since 3.2
*/
public function __set($name, $value)
{
switch ($name) {
case 'maxLength':
$this->maxLength = (int) $value;
break;
case 'dirname':
$value = (string) $value;
$this->dirname = $value == $name || $value === 'true' || $value === '1';
break;
case 'inputmode':
$this->inputmode = (string) $value;
break;
case 'addonBefore':
$this->addonBefore = (string) $value;
break;
case 'addonAfter':
$this->addonAfter = (string) $value;
break;
default:
parent::__set($name, $value);
}
}