Debian Codegraph @

vendor/wikimedia/idle-dom/src/Helper/HTMLLabelElement.php

raw
1 <?php
2
3 // AUTOMATICALLY GENERATED. DO NOT EDIT.
4 // Use `composer build` to regenerate.
5
6 namespace Wikimedia\IDLeDOM\Helper;
7
8 trait HTMLLabelElement {
9
10 // Underscore is used to avoid conflicts with DOM-reserved names
11 // phpcs:disable PSR2.Methods.MethodDeclaration.Underscore
12 // phpcs:disable MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName
13
14 /**
15 * Handle an attempt to get a non-existing property on this
16 * object. The default implementation raises an exception
17 * but the implementor can choose a different behavior:
18 * return null (like JavaScript), dynamically create the
19 * property, etc.
20 * @param string $prop the name of the property requested
21 * @return mixed
22 */
23 abstract protected function _getMissingProp( string $prop );
24
25 /**
26 * Handle an attempt to set a non-existing property on this
27 * object. The default implementation raises an exception
28 * but the implementor can choose a different behavior:
29 * ignore the operation (like JavaScript), dynamically create
30 * the property, etc.
31 * @param string $prop the name of the property requested
32 * @param mixed $value the value to set
33 */
34 abstract protected function _setMissingProp( string $prop, $value ): void;
35
36 // phpcs:enable
37
38 /**
39 * @param string $name
40 * @return mixed
41 */
42 public function __get( string $name ) {
43 '@phan-var \Wikimedia\IDLeDOM\HTMLLabelElement $this';
44 // @var \Wikimedia\IDLeDOM\HTMLLabelElement $this
45 switch ( $name ) {
46 case "nodeType":
47 return $this->getNodeType();
48 case "nodeName":
49 return $this->getNodeName();
50 case "baseURI":
51 return $this->getBaseURI();
52 case "isConnected":
53 return $this->getIsConnected();
54 case "ownerDocument":
55 return $this->getOwnerDocument();
56 case "parentNode":
57 return $this->getParentNode();
58 case "parentElement":
59 return $this->getParentElement();
60 case "childNodes":
61 return $this->getChildNodes();
62 case "firstChild":
63 return $this->getFirstChild();
64 case "lastChild":
65 return $this->getLastChild();
66 case "previousSibling":
67 return $this->getPreviousSibling();
68 case "nextSibling":
69 return $this->getNextSibling();
70 case "nodeValue":
71 return $this->getNodeValue();
72 case "textContent":
73 return $this->getTextContent();
74 case "innerHTML":
75 return $this->getInnerHTML();
76 case "previousElementSibling":
77 return $this->getPreviousElementSibling();
78 case "nextElementSibling":
79 return $this->getNextElementSibling();
80 case "children":
81 return $this->getChildren();
82 case "firstElementChild":
83 return $this->getFirstElementChild();
84 case "lastElementChild":
85 return $this->getLastElementChild();
86 case "childElementCount":
87 return $this->getChildElementCount();
88 case "assignedSlot":
89 return $this->getAssignedSlot();
90 case "namespaceURI":
91 return $this->getNamespaceURI();
92 case "prefix":
93 return $this->getPrefix();
94 case "localName":
95 return $this->getLocalName();
96 case "tagName":
97 return $this->getTagName();
98 case "id":
99 return $this->getId();
100 case "className":
101 return $this->getClassName();
102 case "classList":
103 return $this->getClassList();
104 case "slot":
105 return $this->getSlot();
106 case "attributes":
107 return $this->getAttributes();
108 case "shadowRoot":
109 return $this->getShadowRoot();
110 case "outerHTML":
111 return $this->getOuterHTML();
112 case "style":
113 return $this->getStyle();
114 case "contentEditable":
115 return $this->getContentEditable();
116 case "enterKeyHint":
117 return $this->getEnterKeyHint();
118 case "isContentEditable":
119 return $this->getIsContentEditable();
120 case "inputMode":
121 return $this->getInputMode();
122 case "onload":
123 return $this->getOnload();
124 case "dataset":
125 return $this->getDataset();
126 case "nonce":
127 return $this->getNonce();
128 case "tabIndex":
129 return $this->getTabIndex();
130 case "title":
131 return $this->getTitle();
132 case "lang":
133 return $this->getLang();
134 case "translate":
135 return $this->getTranslate();
136 case "dir":
137 return $this->getDir();
138 case "hidden":
139 return $this->getHidden();
140 case "accessKey":
141 return $this->getAccessKey();
142 case "accessKeyLabel":
143 return $this->getAccessKeyLabel();
144 case "draggable":
145 return $this->getDraggable();
146 case "spellcheck":
147 return $this->getSpellcheck();
148 case "autocapitalize":
149 return $this->getAutocapitalize();
150 case "innerText":
151 return $this->getInnerText();
152 case "offsetParent":
153 return $this->getOffsetParent();
154 case "offsetTop":
155 return $this->getOffsetTop();
156 case "offsetLeft":
157 return $this->getOffsetLeft();
158 case "offsetWidth":
159 return $this->getOffsetWidth();
160 case "offsetHeight":
161 return $this->getOffsetHeight();
162 case "form":
163 return $this->getForm();
164 case "htmlFor":
165 return $this->getHtmlFor();
166 case "control":
167 return $this->getControl();
168 default:
169 break;
170 }
171 '@phan-var \Wikimedia\IDLeDOM\Helper\HTMLLabelElement $this';
172 // @var \Wikimedia\IDLeDOM\Helper\HTMLLabelElement $this
173 return $this->_getMissingProp( $name );
174 }
175
176 /**
177 * @param string $name
178 * @return bool
179 */
180 public function __isset( string $name ): bool {
181 '@phan-var \Wikimedia\IDLeDOM\HTMLLabelElement $this';
182 // @var \Wikimedia\IDLeDOM\HTMLLabelElement $this
183 switch ( $name ) {
184 case "nodeType":
185 return true;
186 case "nodeName":
187 return true;
188 case "baseURI":
189 return true;
190 case "isConnected":
191 return true;
192 case "ownerDocument":
193 return $this->getOwnerDocument() !== null;
194 case "parentNode":
195 return $this->getParentNode() !== null;
196 case "parentElement":
197 return $this->getParentElement() !== null;
198 case "childNodes":
199 return true;
200 case "firstChild":
201 return $this->getFirstChild() !== null;
202 case "lastChild":
203 return $this->getLastChild() !== null;
204 case "previousSibling":
205 return $this->getPreviousSibling() !== null;
206 case "nextSibling":
207 return $this->getNextSibling() !== null;
208 case "nodeValue":
209 return $this->getNodeValue() !== null;
210 case "textContent":
211 return $this->getTextContent() !== null;
212 case "innerHTML":
213 return true;
214 case "previousElementSibling":
215 return $this->getPreviousElementSibling() !== null;
216 case "nextElementSibling":
217 return $this->getNextElementSibling() !== null;
218 case "children":
219 return true;
220 case "firstElementChild":
221 return $this->getFirstElementChild() !== null;
222 case "lastElementChild":
223 return $this->getLastElementChild() !== null;
224 case "childElementCount":
225 return true;
226 case "assignedSlot":
227 return $this->getAssignedSlot() !== null;
228 case "namespaceURI":
229 return $this->getNamespaceURI() !== null;
230 case "prefix":
231 return $this->getPrefix() !== null;
232 case "localName":
233 return true;
234 case "tagName":
235 return true;
236 case "id":
237 return true;
238 case "className":
239 return true;
240 case "classList":
241 return true;
242 case "slot":
243 return true;
244 case "attributes":
245 return true;
246 case "shadowRoot":
247 return $this->getShadowRoot() !== null;
248 case "outerHTML":
249 return true;
250 case "style":
251 return true;
252 case "contentEditable":
253 return true;
254 case "enterKeyHint":
255 return true;
256 case "isContentEditable":
257 return true;
258 case "inputMode":
259 return true;
260 case "onload":
261 return true;
262 case "dataset":
263 return true;
264 case "nonce":
265 return true;
266 case "tabIndex":
267 return true;
268 case "title":
269 return true;
270 case "lang":
271 return true;
272 case "translate":
273 return true;
274 case "dir":
275 return true;
276 case "hidden":
277 return true;
278 case "accessKey":
279 return true;
280 case "accessKeyLabel":
281 return true;
282 case "draggable":
283 return true;
284 case "spellcheck":
285 return true;
286 case "autocapitalize":
287 return true;
288 case "innerText":
289 return true;
290 case "offsetParent":
291 return $this->getOffsetParent() !== null;
292 case "offsetTop":
293 return true;
294 case "offsetLeft":
295 return true;
296 case "offsetWidth":
297 return true;
298 case "offsetHeight":
299 return true;
300 case "form":
301 return $this->getForm() !== null;
302 case "htmlFor":
303 return true;
304 case "control":
305 return $this->getControl() !== null;
306 default:
307 break;
308 }
309 return false;
310 }
311
312 /**
313 * @param string $name
314 * @param mixed $value
315 */
316 public function __set( string $name, $value ): void {
317 '@phan-var \Wikimedia\IDLeDOM\HTMLLabelElement $this';
318 // @var \Wikimedia\IDLeDOM\HTMLLabelElement $this
319 switch ( $name ) {
320 case "nodeValue":
321 $this->setNodeValue( $value );
322 return;
323 case "textContent":
324 $this->setTextContent( $value );
325 return;
326 case "innerHTML":
327 $this->setInnerHTML( $value );
328 return;
329 case "id":
330 $this->setId( $value );
331 return;
332 case "className":
333 $this->setClassName( $value );
334 return;
335 case "classList":
336 $this->setClassList( $value );
337 return;
338 case "slot":
339 $this->setSlot( $value );
340 return;
341 case "outerHTML":
342 $this->setOuterHTML( $value );
343 return;
344 case "style":
345 $this->setStyle( $value );
346 return;
347 case "contentEditable":
348 $this->setContentEditable( $value );
349 return;
350 case "enterKeyHint":
351 $this->setEnterKeyHint( $value );
352 return;
353 case "inputMode":
354 $this->setInputMode( $value );
355 return;
356 case "onload":
357 $this->setOnload( $value );
358 return;
359 case "nonce":
360 $this->setNonce( $value );
361 return;
362 case "tabIndex":
363 $this->setTabIndex( $value );
364 return;
365 case "title":
366 $this->setTitle( $value );
367 return;
368 case "lang":
369 $this->setLang( $value );
370 return;
371 case "translate":
372 $this->setTranslate( $value );
373 return;
374 case "dir":
375 $this->setDir( $value );
376 return;
377 case "hidden":
378 $this->setHidden( $value );
379 return;
380 case "accessKey":
381 $this->setAccessKey( $value );
382 return;
383 case "draggable":
384 $this->setDraggable( $value );
385 return;
386 case "spellcheck":
387 $this->setSpellcheck( $value );
388 return;
389 case "autocapitalize":
390 $this->setAutocapitalize( $value );
391 return;
392 case "innerText":
393 $this->setInnerText( $value );
394 return;
395 case "htmlFor":
396 $this->setHtmlFor( $value );
397 return;
398 default:
399 break;
400 }
401 '@phan-var \Wikimedia\IDLeDOM\Helper\HTMLLabelElement $this';
402 // @var \Wikimedia\IDLeDOM\Helper\HTMLLabelElement $this
403 $this->_setMissingProp( $name, $value );
404 }
405
406 /**
407 * @param string $name
408 */
409 public function __unset( string $name ): void {
410 '@phan-var \Wikimedia\IDLeDOM\HTMLLabelElement $this';
411 // @var \Wikimedia\IDLeDOM\HTMLLabelElement $this
412 switch ( $name ) {
413 case "nodeType":
414 break;
415 case "nodeName":
416 break;
417 case "baseURI":
418 break;
419 case "isConnected":
420 break;
421 case "ownerDocument":
422 break;
423 case "parentNode":
424 break;
425 case "parentElement":
426 break;
427 case "childNodes":
428 break;
429 case "firstChild":
430 break;
431 case "lastChild":
432 break;
433 case "previousSibling":
434 break;
435 case "nextSibling":
436 break;
437 case "nodeValue":
438 $this->setNodeValue( null );
439 return;
440 case "textContent":
441 $this->setTextContent( null );
442 return;
443 case "innerHTML":
444 break;
445 case "previousElementSibling":
446 break;
447 case "nextElementSibling":
448 break;
449 case "children":
450 break;
451 case "firstElementChild":
452 break;
453 case "lastElementChild":
454 break;
455 case "childElementCount":
456 break;
457 case "assignedSlot":
458 break;
459 case "namespaceURI":
460 break;
461 case "prefix":
462 break;
463 case "localName":
464 break;
465 case "tagName":
466 break;
467 case "id":
468 break;
469 case "className":
470 break;
471 case "classList":
472 break;
473 case "slot":
474 break;
475 case "attributes":
476 break;
477 case "shadowRoot":
478 break;
479 case "outerHTML":
480 break;
481 case "style":
482 break;
483 case "contentEditable":
484 break;
485 case "enterKeyHint":
486 break;
487 case "isContentEditable":
488 break;
489 case "inputMode":
490 break;
491 case "onload":
492 break;
493 case "dataset":
494 break;
495 case "nonce":
496 break;
497 case "tabIndex":
498 break;
499 case "title":
500 break;
501 case "lang":
502 break;
503 case "translate":
504 break;
505 case "dir":
506 break;
507 case "hidden":
508 break;
509 case "accessKey":
510 break;
511 case "accessKeyLabel":
512 break;
513 case "draggable":
514 break;
515 case "spellcheck":
516 break;
517 case "autocapitalize":
518 break;
519 case "innerText":
520 break;
521 case "offsetParent":
522 break;
523 case "offsetTop":
524 break;
525 case "offsetLeft":
526 break;
527 case "offsetWidth":
528 break;
529 case "offsetHeight":
530 break;
531 case "form":
532 break;
533 case "htmlFor":
534 break;
535 case "control":
536 break;
537 default:
538 return;
539 }
540 $trace = debug_backtrace();
541 while (
542 count( $trace ) > 0 &&
543 $trace[0]['function'] !== "__unset"
544 ) {
545 array_shift( $trace );
546 }
547 trigger_error(
548 'Undefined property' .
549 ' via ' . ( $trace[0]['function'] ?? '' ) . '(): ' . $name .
550 ' in ' . ( $trace[0]['file'] ?? '' ) .
551 ' on line ' . ( $trace[0]['line'] ?? '' ),
552 E_USER_NOTICE
553 );
554 }
555
556 /**
557 * @return string
558 */
559 public function getHtmlFor(): string {
560 '@phan-var \Wikimedia\IDLeDOM\Element $this';
561 // @var \Wikimedia\IDLeDOM\Element $this
562 return $this->getAttribute( 'for' ) ?? '';
563 }
564
565 /**
566 * @param string $val
567 */
568 public function setHtmlFor( string $val ): void {
569 '@phan-var \Wikimedia\IDLeDOM\Element $this';
570 // @var \Wikimedia\IDLeDOM\Element $this
571 $this->setAttribute( 'for', $val );
572 }
573
574 }