diff --git a/composer.json b/composer.json index 7fbcfde..728025e 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,6 @@ } ], "require": { - //PHP7.1 "krutush/template": "dev-master" }, "autoload": { diff --git a/src/Element.php b/src/Element.php index b156e6e..c946c26 100644 --- a/src/Element.php +++ b/src/Element.php @@ -9,14 +9,19 @@ class Element{ $this->data['name'] = $name; } + public function rename(string $name): self{ + $this->data['name'] = $name; + return $this; + } + public function name() : string{ return $this->data['name']; } - public function required(bool $value = true) : Element{ + public function required(bool $value = true) : self{ $this->data['required'] = $value; return $this; } - public function value(string $value) : Element{ + public function value(string $value) : self{ $this->data['value'] = $value; return $this; } @@ -25,7 +30,7 @@ class Element{ return $this->data['value']; } - public function error(bool $value = true) : Element{ + public function error(bool $value = true) : self{ $this->data['error'] = $value; return $this; } diff --git a/src/Form.php b/src/Form.php index 0aa6a87..4f87808 100644 --- a/src/Form.php +++ b/src/Form.php @@ -58,7 +58,29 @@ class Form { $this->method = $method; $this->url = $url; } - return '