id === null) { $this->id = $this->name; $this->attributes['id'] = $this->id; } } public function setRequired(string $value): void { $this->required = $value === 'true'; } public function setReadonly(string $value): void { $this->readonly = $value === 'true'; if ($this->readonly) { $this->attributes['readonly'] = 'readonly'; } else { unset($this->attributes['readonly']); } } }