1 | <?php |
||
14 | final class Input extends AbstractElement |
||
15 | { |
||
16 | public function __construct(AttributeSet $attributes = null) |
||
21 | |||
22 | public function withAttribute(string $name, string $value = null): Input |
||
32 | |||
33 | public function withType(string $type): Input |
||
37 | |||
38 | public function withAccept(string $fileTypes): Input |
||
42 | |||
43 | public function withAutoComplete(string $mode = 'on'): Input |
||
47 | |||
48 | public function withAutoFocus(): Input |
||
52 | |||
53 | public function withCapture(string $capture): Input |
||
57 | |||
58 | public function withChecked(): Input |
||
62 | |||
63 | public function withDisabled(): Input |
||
67 | |||
68 | public function withForm(string $id): Input |
||
72 | |||
73 | public function withFormAction(string $url): Input |
||
77 | |||
78 | public function withFormEncType(string $encoding = 'application/x-www-form-urlencoded'): Input |
||
82 | |||
83 | public function withFormMethod(string $method): Input |
||
87 | |||
88 | public function withFormNoValidate(): Input |
||
92 | |||
93 | public function withFormTarget(string $target = '_self'): Input |
||
97 | |||
98 | public function withHeight(int $pixels): Input |
||
102 | |||
103 | public function withInputMode(string $mode): Input |
||
107 | |||
108 | public function withList(string $dataListId): Input |
||
112 | |||
113 | public function withMax(string $max): Input |
||
117 | |||
118 | public function withMaxLength(string $max): Input |
||
122 | |||
123 | public function withMin(string $min): Input |
||
127 | |||
128 | public function withMinLength(string $min): Input |
||
132 | |||
133 | public function withMultiple(): Input |
||
137 | |||
138 | public function withName(string $name): Input |
||
142 | |||
143 | public function withPattern(string $regex): Input |
||
147 | |||
148 | public function withPlaceholder(string $placeholder): Input |
||
152 | |||
153 | public function withReadOnly(): Input |
||
157 | |||
158 | public function withRequired(): Input |
||
162 | |||
163 | public function withSelectionDirection(string $direction = 'forward'): Input |
||
167 | |||
168 | public function withSelectionEnd(string $end): Input |
||
172 | |||
173 | public function withSelectionStart(string $start): Input |
||
177 | |||
178 | public function withSize(int $size): Input |
||
182 | |||
183 | public function withSpellCheck(string $check = 'default'): Input |
||
187 | |||
188 | public function withSrc(string $url): Input |
||
192 | |||
193 | public function withStep(string $increment): Input |
||
197 | |||
198 | public function withValue(string $value): Input |
||
202 | |||
203 | public function withWidth(int $width): Input |
||
207 | } |
||
208 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: