1 | <?php |
||
13 | abstract class AbstractElement implements ElementInterface |
||
14 | { |
||
15 | /** @var $attributes AttributeSet */ |
||
16 | protected $attributes; |
||
17 | /** @var $children ElementSet */ |
||
18 | protected $children; |
||
19 | /** @var $tag TagInterface */ |
||
20 | protected $tag; |
||
21 | |||
22 | final public function render(): string |
||
26 | |||
27 | /** |
||
28 | * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey |
||
29 | */ |
||
30 | public function withAccessKey(string $key): self |
||
34 | |||
35 | /** |
||
36 | * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class |
||
37 | */ |
||
38 | public function withClass(string $class): self |
||
42 | |||
43 | /** |
||
44 | * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable |
||
45 | */ |
||
46 | public function withContentEditable(string $editable = 'true'): self |
||
50 | |||
51 | /** |
||
52 | * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contextmenu |
||
53 | */ |
||
54 | public function withContextMenu(string $id): self |
||
58 | |||
59 | /** |
||
60 | * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir |
||
61 | */ |
||
62 | public function withDir(string $direction = 'auto'): self |
||
66 | |||
67 | /** |
||
68 | * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden |
||
69 | */ |
||
70 | public function withHidden(): self |
||
74 | |||
75 | /** |
||
76 | * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id |
||
77 | */ |
||
78 | public function withId(string $id): self |
||
82 | |||
83 | /** |
||
84 | * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang |
||
85 | */ |
||
86 | public function withLang(string $lang): self |
||
90 | |||
91 | /** |
||
92 | * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/style |
||
93 | */ |
||
94 | public function withStyle(string $css): self |
||
98 | |||
99 | /** |
||
100 | * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex |
||
101 | */ |
||
102 | public function withTabIndex(int $tabIndex): self |
||
106 | |||
107 | /** |
||
108 | * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title |
||
109 | */ |
||
110 | public function withTitle(string $title): self |
||
114 | |||
115 | /** |
||
116 | * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/translate |
||
117 | */ |
||
118 | public function withTranslate(string $translate = 'yes'): self |
||
122 | } |
||
123 |