Debian Codegraph @

vendor/wikimedia/idle-dom/src/Helper/HTMLOutputElement.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 HTMLOutputElement {
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\HTMLOutputElement $this';
44 // @var \Wikimedia\IDLeDOM\HTMLOutputElement $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 "htmlFor":
163 return $this->getHtmlFor();
164 case "form":
165 return $this->getForm();
166 case "name":
167 return $this->getName();
168 case "type":
169 return $this->getType();
170 case "defaultValue":
171 return $this->getDefaultValue();
172 case "value":
173 return $this->getValue();
174 case "willValidate":
175 return $this->getWillValidate();
176 case "validity":
177 return $this->getValidity();
178 case "validationMessage":
179 return $this->getValidationMessage();
180 case "labels":
181 return $this->getLabels();
182 default:
183 break;
184 }
185 '@phan-var \Wikimedia\IDLeDOM\Helper\HTMLOutputElement $this';
186 // @var \Wikimedia\IDLeDOM\Helper\HTMLOutputElement $this
187 return $this->_getMissingProp( $name );
188 }
189
190 /**
191 * @param string $name
192 * @return bool
193 */
194 public function __isset( string $name ): bool {
195 '@phan-var \Wikimedia\IDLeDOM\HTMLOutputElement $this';
196 // @var \Wikimedia\IDLeDOM\HTMLOutputElement $this
197 switch ( $name ) {
198 case "nodeType":
199 return true;
200 case "nodeName":
201 return true;
202 case "baseURI":
203 return true;
204 case "isConnected":
205 return true;
206 case "ownerDocument":
207 return $this->getOwnerDocument() !== null;
208 case "parentNode":
209 return $this->getParentNode() !== null;
210 case "parentElement":
211 return $this->getParentElement() !== null;
212 case "childNodes":
213 return true;
214 case "firstChild":
215 return $this->getFirstChild() !== null;
216 case "lastChild":
217 return $this->getLastChild() !== null;
218 case "previousSibling":
219 return $this->getPreviousSibling() !== null;
220 case "nextSibling":
221 return $this->getNextSibling() !== null;
222 case "nodeValue":
223 return $this->getNodeValue() !== null;
224 case "textContent":
225 return $this->getTextContent() !== null;
226 case "innerHTML":
227 return true;
228 case "previousElementSibling":
229 return $this->getPreviousElementSibling() !== null;
230 case "nextElementSibling":
231 return $this->getNextElementSibling() !== null;
232 case "children":
233 return true;
234 case "firstElementChild":
235 return $this->getFirstElementChild() !== null;
236 case "lastElementChild":
237 return $this->getLastElementChild() !== null;
238 case "childElementCount":
239 return true;
240 case "assignedSlot":
241 return $this->getAssignedSlot() !== null;
242 case "namespaceURI":
243 return $this->getNamespaceURI() !== null;
244 case "prefix":
245 return $this->getPrefix() !== null;
246 case "localName":
247 return true;
248 case "tagName":
249 return true;
250 case "id":
251 return true;
252 case "className":
253 return true;
254 case "classList":
255 return true;
256 case "slot":
257 return true;
258 case "attributes":
259 return true;
260 case "shadowRoot":
261 return $this->getShadowRoot() !== null;
262 case "outerHTML":
263 return true;
264 case "style":
265 return true;
266 case "contentEditable":
267 return true;
268 case "enterKeyHint":
269 return true;
270 case "isContentEditable":
271 return true;
272 case "inputMode":
273 return true;
274 case "onload":
275 return true;
276 case "dataset":
277 return true;
278 case "nonce":
279 return true;
280 case "tabIndex":
281 return true;
282 case "title":
283 return true;
284 case "lang":
285 return true;
286 case "translate":
287 return true;
288 case "dir":
289 return true;
290 case "hidden":
291 return true;
292 case "accessKey":
293 return true;
294 case "accessKeyLabel":
295 return true;
296 case "draggable":
297 return true;
298 case "spellcheck":
299 return true;
300 case "autocapitalize":
301 return true;
302 case "innerText":
303 return true;
304 case "offsetParent":
305 return $this->getOffsetParent() !== null;
306 case "offsetTop":
307 return true;
308 case "offsetLeft":
309 return true;
310 case "offsetWidth":
311 return true;
312 case "offsetHeight":
313 return true;
314 case "htmlFor":
315 return true;
316 case "form":
317 return $this->getForm() !== null;
318 case "name":
319 return true;
320 case "type":
321 return true;
322 case "defaultValue":
323 return true;
324 case "value":
325 return true;
326 case "willValidate":
327 return true;
328 case "validity":
329 return true;
330 case "validationMessage":
331 return true;
332 case "labels":
333 return true;
334 default:
335 break;
336 }
337 return false;
338 }
339
340 /**
341 * @param string $name
342 * @param mixed $value
343 */
344 public function __set( string $name, $value ): void {
345 '@phan-var \Wikimedia\IDLeDOM\HTMLOutputElement $this';
346 // @var \Wikimedia\IDLeDOM\HTMLOutputElement $this
347 switch ( $name ) {
348 case "nodeValue":
349 $this->setNodeValue( $value );
350 return;
351 case "textContent":
352 $this->setTextContent( $value );
353 return;
354 case "innerHTML":
355 $this->setInnerHTML( $value );
356 return;
357 case "id":
358 $this->setId( $value );
359 return;
360 case "className":
361 $this->setClassName( $value );
362 return;
363 case "classList":
364 $this->setClassList( $value );
365 return;
366 case "slot":
367 $this->setSlot( $value );
368 return;
369 case "outerHTML":
370 $this->setOuterHTML( $value );
371 return;
372 case "style":
373 $this->setStyle( $value );
374 return;
375 case "contentEditable":
376 $this->setContentEditable( $value );
377 return;
378 case "enterKeyHint":
379 $this->setEnterKeyHint( $value );
380 return;
381 case "inputMode":
382 $this->setInputMode( $value );
383 return;
384 case "onload":
385 $this->setOnload( $value );
386 return;
387 case "nonce":
388 $this->setNonce( $value );
389 return;
390 case "tabIndex":
391 $this->setTabIndex( $value );
392 return;
393 case "title":
394 $this->setTitle( $value );
395 return;
396 case "lang":
397 $this->setLang( $value );
398 return;
399 case "translate":
400 $this->setTranslate( $value );
401 return;
402 case "dir":
403 $this->setDir( $value );
404 return;
405 case "hidden":
406 $this->setHidden( $value );
407 return;
408 case "accessKey":
409 $this->setAccessKey( $value );
410 return;
411 case "draggable":
412 $this->setDraggable( $value );
413 return;
414 case "spellcheck":
415 $this->setSpellcheck( $value );
416 return;
417 case "autocapitalize":
418 $this->setAutocapitalize( $value );
419 return;
420 case "innerText":
421 $this->setInnerText( $value );
422 return;
423 case "htmlFor":
424 $this->setHtmlFor( $value );
425 return;
426 case "name":
427 $this->setName( $value );
428 return;
429 case "defaultValue":
430 $this->setDefaultValue( $value );
431 return;
432 case "value":
433 $this->setValue( $value );
434 return;
435 default:
436 break;
437 }
438 '@phan-var \Wikimedia\IDLeDOM\Helper\HTMLOutputElement $this';
439 // @var \Wikimedia\IDLeDOM\Helper\HTMLOutputElement $this
440 $this->_setMissingProp( $name, $value );
441 }
442
443 /**
444 * @param string $name
445 */
446 public function __unset( string $name ): void {
447 '@phan-var \Wikimedia\IDLeDOM\HTMLOutputElement $this';
448 // @var \Wikimedia\IDLeDOM\HTMLOutputElement $this
449 switch ( $name ) {
450 case "nodeType":
451 break;
452 case "nodeName":
453 break;
454 case "baseURI":
455 break;
456 case "isConnected":
457 break;
458 case "ownerDocument":
459 break;
460 case "parentNode":
461 break;
462 case "parentElement":
463 break;
464 case "childNodes":
465 break;
466 case "firstChild":
467 break;
468 case "lastChild":
469 break;
470 case "previousSibling":
471 break;
472 case "nextSibling":
473 break;
474 case "nodeValue":
475 $this->setNodeValue( null );
476 return;
477 case "textContent":
478 $this->setTextContent( null );
479 return;
480 case "innerHTML":
481 break;
482 case "previousElementSibling":
483 break;
484 case "nextElementSibling":
485 break;
486 case "children":
487 break;
488 case "firstElementChild":
489 break;
490 case "lastElementChild":
491 break;
492 case "childElementCount":
493 break;
494 case "assignedSlot":
495 break;
496 case "namespaceURI":
497 break;
498 case "prefix":
499 break;
500 case "localName":
501 break;
502 case "tagName":
503 break;
504 case "id":
505 break;
506 case "className":
507 break;
508 case "classList":
509 break;
510 case "slot":
511 break;
512 case "attributes":
513 break;
514 case "shadowRoot":
515 break;
516 case "outerHTML":
517 break;
518 case "style":
519 break;
520 case "contentEditable":
521 break;
522 case "enterKeyHint":
523 break;
524 case "isContentEditable":
525 break;
526 case "inputMode":
527 break;
528 case "onload":
529 break;
530 case "dataset":
531 break;
532 case "nonce":
533 break;
534 case "tabIndex":
535 break;
536 case "title":
537 break;
538 case "lang":
539 break;
540 case "translate":
541 break;
542 case "dir":
543 break;
544 case "hidden":
545 break;
546 case "accessKey":
547 break;
548 case "accessKeyLabel":
549 break;
550 case "draggable":
551 break;
552 case "spellcheck":
553 break;
554 case "autocapitalize":
555 break;
556 case "innerText":
557 break;
558 case "offsetParent":
559 break;
560 case "offsetTop":
561 break;
562 case "offsetLeft":
563 break;
564 case "offsetWidth":
565 break;
566 case "offsetHeight":
567 break;
568 case "htmlFor":
569 break;
570 case "form":
571 break;
572 case "name":
573 break;
574 case "type":
575 break;
576 case "defaultValue":
577 break;
578 case "value":
579 break;
580 case "willValidate":
581 break;
582 case "validity":
583 break;
584 case "validationMessage":
585 break;
586 case "labels":
587 break;
588 default:
589 return;
590 }
591 $trace = debug_backtrace();
592 while (
593 count( $trace ) > 0 &&
594 $trace[0]['function'] !== "__unset"
595 ) {
596 array_shift( $trace );
597 }
598 trigger_error(
599 'Undefined property' .
600 ' via ' . ( $trace[0]['function'] ?? '' ) . '(): ' . $name .
601 ' in ' . ( $trace[0]['file'] ?? '' ) .
602 ' on line ' . ( $trace[0]['line'] ?? '' ),
603 E_USER_NOTICE
604 );
605 }
606
607 /**
608 * @param string $val
609 */
610 public function setHtmlFor( string $val ): void {
611 '@phan-var \Wikimedia\IDLeDOM\HTMLOutputElement $this';
612 // @var \Wikimedia\IDLeDOM\HTMLOutputElement $this
613 $this->getHtmlFor()->setValue( $val );
614 }
615
616 /**
617 * @return string
618 */
619 public function getName(): string {
620 '@phan-var \Wikimedia\IDLeDOM\Element $this';
621 // @var \Wikimedia\IDLeDOM\Element $this
622 return $this->getAttribute( 'name' ) ?? '';
623 }
624
625 /**
626 * @param string $val
627 */
628 public function setName( string $val ): void {
629 '@phan-var \Wikimedia\IDLeDOM\Element $this';
630 // @var \Wikimedia\IDLeDOM\Element $this
631 $this->setAttribute( 'name', $val );
632 }
633
634 }