typeInput = $typeInput; $this->name = $name; $this->paramsArray = $paramsArray; $this->value = $value; $this->inputTemplate = new SimpleTemplate(); } /** * @return $this */ public function create(): self { $paramsString = $this->createParams($this->paramsArray); $label = ""; $button = ""; $this->createLabel(); $this->html = str_replace('{input}', $button, $this->inputTemplate->getInputTemplate()); $this->html = str_replace('{label}', $this->labelString, $this->html); return $this; } /** * @param string $name * @param string $value * @param array $paramsArray * @return void */ public static function build( string $name, string $value, string $typeInput, array $paramsArray = []): void { $button = new self($name, $value, $typeInput, $paramsArray); $button->create()->render(); } }