| 1 | <?php |
||
| 11 | abstract class BaseInput implements FormElementInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | private $name; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | private $options; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var string|int |
||
| 25 | */ |
||
| 26 | private $value; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | private $type; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param string $name |
||
| 35 | * @param string $type |
||
| 36 | * @param array $options |
||
| 37 | */ |
||
| 38 | public function __construct($name, $type, array $options = []) |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @inheritDoc |
||
| 51 | */ |
||
| 52 | public function getType() |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @inheritDoc |
||
| 59 | */ |
||
| 60 | public function getOptions() |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @inheritDoc |
||
| 67 | */ |
||
| 68 | public function getName() |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @inheritDoc |
||
| 75 | */ |
||
| 76 | public function getValue() |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @inheritDoc |
||
| 83 | */ |
||
| 84 | public function setValue($value) |
||
| 88 | |||
| 89 | /** |
||
| 90 | * @param string $name |
||
| 91 | * @param int|string $value |
||
| 92 | * |
||
| 93 | * @return $this |
||
| 94 | */ |
||
| 95 | public function setAttribute($name, $value) |
||
| 101 | |||
| 102 | /** |
||
| 103 | * @return $this |
||
| 104 | */ |
||
| 105 | public function required(){ |
||
| 110 | |||
| 111 | /** |
||
| 112 | * @return $this |
||
| 113 | */ |
||
| 114 | public function disable(){ |
||
| 118 | |||
| 119 | /** |
||
| 120 | * @param string $option |
||
| 121 | * |
||
| 122 | * @return string|int|boolean|null |
||
| 123 | */ |
||
| 124 | public function getOption($option){ |
||
| 131 | |||
| 132 | } |