1 | <?php |
||
8 | abstract class Element implements ElementContract |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $name; |
||
14 | |||
15 | /** |
||
16 | * @var array |
||
17 | * |
||
18 | * @see OptionsResolver::setDefault() |
||
19 | */ |
||
20 | protected $defaults = []; |
||
21 | |||
22 | /** |
||
23 | * @var array |
||
24 | * |
||
25 | * @see OptionsResolver::setRequired() |
||
26 | */ |
||
27 | protected $required = []; |
||
28 | |||
29 | /** |
||
30 | * @var array |
||
31 | * |
||
32 | * @see OptionsResolver::setAllowedTypes() |
||
33 | */ |
||
34 | protected $types = []; |
||
35 | |||
36 | /** |
||
37 | * @var array |
||
38 | * |
||
39 | * @see OptionsResolver::setAllowedValues() |
||
40 | */ |
||
41 | protected $values = []; |
||
42 | |||
43 | /** |
||
44 | * @var array |
||
45 | */ |
||
46 | protected $options = []; |
||
47 | |||
48 | public function __construct(array $options = []) |
||
52 | |||
53 | public function setOptions(array $options) |
||
57 | |||
58 | public function getOptions(): array |
||
62 | |||
63 | abstract public function render(): string; |
||
64 | |||
65 | public function toString(): string |
||
69 | |||
70 | public function __toString(): string |
||
74 | |||
75 | protected function optionsResolver(): OptionsResolver |
||
96 | } |
||
97 |