1 | <?php |
||
16 | class Input extends ClosedElement implements FlowContent, InteractiveContent, PhrasingContent |
||
17 | { |
||
18 | 7 | protected function getAllowedAttributes() |
|
19 | { |
||
20 | $inputAllowedAttributes = array( |
||
21 | 7 | '/^accept$/i' => Attribute::CI_STRING, |
|
22 | '/^alt$/i' => Attribute::CS_STRING, |
||
23 | '/^autocomplete$/i' => Attribute::CS_STRING, |
||
24 | '/^autofocus$/i' => Attribute::BOOL, |
||
25 | '/^checked$/i' => Attribute::BOOL, |
||
26 | '/^dirname$/i' => Attribute::CS_STRING, |
||
27 | '/^disabled$/i' => Attribute::BOOL, |
||
28 | '/^form$/i' => Attribute::CS_STRING, |
||
29 | '/^formaction$/i' => Attribute::URI, |
||
30 | '/^formenctype$/i' => Attribute::CS_STRING, |
||
31 | '/^formmethod$/i' => Attribute::CI_ENUM . '("","get","post","dialog"|"get")', |
||
32 | '/^formnovalidate$/i' => Attribute::BOOL, |
||
33 | '/^formtarget$/i' => Attribute::CS_STRING, |
||
34 | '/^height$/i' => Attribute::INT, |
||
35 | '/^inputmode$/i' => Attribute::CI_STRING, |
||
36 | '/^list$/i' => Attribute::CS_STRING, |
||
37 | '/^max$/i' => Attribute::CS_STRING, |
||
38 | '/^maxlength$/i' => Attribute::INT, |
||
39 | '/^min$/i' => Attribute::CS_STRING, |
||
40 | '/^minlength$/i' => Attribute::INT, |
||
41 | '/^multiple$/i' => Attribute::BOOL, |
||
42 | '/^name$/i' => Attribute::CS_STRING, |
||
43 | '/^pattern$/i' => Attribute::CS_STRING, |
||
44 | '/^placeholder$/i' => Attribute::CS_STRING, |
||
45 | '/^readonly$/i' => Attribute::BOOL, |
||
46 | '/^required$/i' => Attribute::BOOL, |
||
47 | '/^size$/i' => Attribute::INT, |
||
48 | '/^src$/i' => Attribute::URI, |
||
49 | '/^step$/i' => Attribute::CI_STRING, |
||
50 | '/^type$/i' => Attribute::CI_ENUM . '("hidden","text","search","tel","url","email","password","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"|"text")', |
||
51 | '/^value$/i' => Attribute::CS_STRING, |
||
52 | '/^width$/i' => Attribute::INT |
||
53 | ); |
||
54 | |||
55 | 7 | return array_merge( |
|
56 | 7 | $inputAllowedAttributes, |
|
57 | 7 | parent::getAllowedAttributes() |
|
58 | ); |
||
59 | } |
||
60 | |||
61 | 1 | public function isInteractiveContent() : bool |
|
69 | } |
||
70 |