title = $title; $this->paramsArray = $paramsArray; } /** * @return $this */ public function create(): self { $paramsString = $this->createParams($this->paramsArray); $this->html = ""; return $this; } /** * @return string */ public function getHtml(): string { return $this->html; } /** * @param string $title * @param array $paramsArray * @return void */ public static function build(string $title, array $paramsArray = []) { $label = new self($title, $paramsArray); $label->create()->render(); } }