diff --git a/src/builders/EmailBuilder.php b/src/builders/EmailBuilder.php new file mode 100755 index 0000000..abf4d28 --- /dev/null +++ b/src/builders/EmailBuilder.php @@ -0,0 +1,16 @@ +name = $name; + $this->paramsArray = $paramsArray; + $this->inputTemplate = new SimpleTemplate(); + } + + /** + * @return self + */ + public function create(): self + { + $paramsString = $this->createParams($this->paramsArray); + $label = ""; + $input = ""; + + $this->createLabel(); + + $this->html = str_replace('{input}', $input, $this->inputTemplate->getInputTemplate()); + $this->html = str_replace('{label}', $this->labelString, $this->html); + + return $this; + } + + /** + * @param string $name + * @param array $paramsArray + * @return void + */ + public static function build(string $name, array $paramsArray = []): void + { + $input = new self($name, $paramsArray); + $input->create()->render(); + + } + +} \ No newline at end of file