1 | <?php |
||
8 | class Input extends BaseElement { |
||
9 | |||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $tag = 'input'; |
||
14 | |||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | protected $attributes = [ |
||
19 | 'type' => 'text', |
||
20 | ]; |
||
21 | |||
22 | |||
23 | /** |
||
24 | * @return null|string |
||
25 | */ |
||
26 | 1 | public function getType() { |
|
27 | 1 | return $this->getAttribute('type'); |
|
28 | } |
||
29 | |||
30 | |||
31 | /** |
||
32 | * Alias of $this->setAttribute('type' 'text'); |
||
33 | * |
||
34 | * @param string $type |
||
35 | * @return $this |
||
36 | */ |
||
37 | 6 | public function setType($type) { |
|
41 | |||
42 | |||
43 | /** |
||
44 | * @param $value |
||
45 | * @return $this |
||
46 | */ |
||
47 | 16 | public function setValue($value) { |
|
51 | |||
52 | |||
53 | } |