html; } public function fetch(): string { return $this->html; } public abstract function create(); /** * @param string|Label $title * @return $this */ public function setLabel(string|Label $title): self { $this->hasLabel = true; $this->label= $title; return $this; } protected function createLabel() { if($this->hasLabel) { if(is_string($this->label)){ $this->labelString = ""; } else { $this->labelString= $this->label->create()->fetch(); } } } /** * @param $template * @return $this */ public function setTemplate($template): self { $this->inputTemplate = new $template(); return $this; } }