public function __set($property, $value) { if (in_array($property, ['name', 'value'])) { $this->{"_" . $property} = $value; if ($property != 'value' or $this->type == 'input') { $this->attributes[$property] = $value; } } }