name; $data['class'] = $this->class; $data['id'] = $this->id; $data['value'] = is_null($this->value) ? $this->default : $this->value; $data['required'] = $this->required === "true" || $this->required === true ? true : false; $data['readonly'] = $this->readonly === "true" || $this->readonly === true ? true : false; $data['step'] = $this->step ? $this->step : 1; if (isset($this->min)) { $data['min'] = $this->min; } if (isset($this->max)) { $data['max'] = $this->max; } return $data; } }