1 | <?php |
||
11 | class Select { |
||
12 | |||
13 | private $options = []; |
||
14 | private $currentValue; |
||
15 | |||
16 | /** |
||
17 | * Cria o select com os <option>'s |
||
18 | * @param string[] $options array com titulo dos options |
||
19 | * @param string $currentValue option que será selecionado |
||
20 | */ |
||
21 | public function __construct($options = [], $currentValue = '') { |
||
25 | |||
26 | /** |
||
27 | * Exibe os <option>'s do select |
||
28 | * @return string |
||
29 | */ |
||
30 | public function __toString() { |
||
37 | |||
38 | /** |
||
39 | * Retorna selected="true" se os valores são iguais |
||
40 | * @param mixed $value1 |
||
41 | * @param mixed $value2 |
||
42 | */ |
||
43 | public static function active($value1, $value2 = true) { |
||
48 | |||
49 | } |
||
50 |