name = $name; $this->value = $value; $this->paramsArray = $paramsArray; $this->inputTemplate = new SimpleTemplate(); } /** * @return $this */ public function create(): self { $paramsString = $this->createParams($this->paramsArray); $hidden = ""; $label = ""; $this->createLabel(); $this->html = str_replace('{input}', $hidden, $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, array $paramsArray): void { $hidden = new self($name, $value, $paramsArray); $hidden->create()->render(); } }