Debian Codegraph @

vendor/wikimedia/idle-dom/src/Helper/HTMLObjectElement.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 HTMLObjectElement {
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\HTMLObjectElement $this';
44 // @var \Wikimedia\IDLeDOM\HTMLObjectElement $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 "data":
163 return $this->getData();
164 case "type":
165 return $this->getType();
166 case "name":
167 return $this->getName();
168 case "useMap":
169 return $this->getUseMap();
170 case "form":
171 return $this->getForm();
172 case "width":
173 return $this->getWidth();
174 case "height":
175 return $this->getHeight();
176 case "contentDocument":
177 return $this->getContentDocument();
178 case "willValidate":
179 return $this->getWillValidate();
180 case "validity":
181 return $this->getValidity();
182 case "validationMessage":
183 return $this->getValidationMessage();
184 case "align":
185 return $this->getAlign();
186 case "archive":
187 return $this->getArchive();
188 case "code":
189 return $this->getCode();
190 case "declare":
191 return $this->getDeclare();
192 case "hspace":
193 return $this->getHspace();
194 case "standby":
195 return $this->getStandby();
196 case "vspace":
197 return $this->getVspace();
198 case "codeBase":
199 return $this->getCodeBase();
200 case "codeType":
201 return $this->getCodeType();
202 case "border":
203 return $this->getBorder();
204 default:
205 break;
206 }
207 '@phan-var \Wikimedia\IDLeDOM\Helper\HTMLObjectElement $this';
208 // @var \Wikimedia\IDLeDOM\Helper\HTMLObjectElement $this
209 return $this->_getMissingProp( $name );
210 }
211
212 /**
213 * @param string $name
214 * @return bool
215 */
216 public function __isset( string $name ): bool {
217 '@phan-var \Wikimedia\IDLeDOM\HTMLObjectElement $this';
218 // @var \Wikimedia\IDLeDOM\HTMLObjectElement $this
219 switch ( $name ) {
220 case "nodeType":
221 return true;
222 case "nodeName":
223 return true;
224 case "baseURI":
225 return true;
226 case "isConnected":
227 return true;
228 case "ownerDocument":
229 return $this->getOwnerDocument() !== null;
230 case "parentNode":
231 return $this->getParentNode() !== null;
232 case "parentElement":
233 return $this->getParentElement() !== null;
234 case "childNodes":
235 return true;
236 case "firstChild":
237 return $this->getFirstChild() !== null;
238 case "lastChild":
239 return $this->getLastChild() !== null;
240 case "previousSibling":
241 return $this->getPreviousSibling() !== null;
242 case "nextSibling":
243 return $this->getNextSibling() !== null;
244 case "nodeValue":
245 return $this->getNodeValue() !== null;
246 case "textContent":
247 return $this->getTextContent() !== null;
248 case "innerHTML":
249 return true;
250 case "previousElementSibling":
251 return $this->getPreviousElementSibling() !== null;
252 case "nextElementSibling":
253 return $this->getNextElementSibling() !== null;
254 case "children":
255 return true;
256 case "firstElementChild":
257 return $this->getFirstElementChild() !== null;
258 case "lastElementChild":
259 return $this->getLastElementChild() !== null;
260 case "childElementCount":
261 return true;
262 case "assignedSlot":
263 return $this->getAssignedSlot() !== null;
264 case "namespaceURI":
265 return $this->getNamespaceURI() !== null;
266 case "prefix":
267 return $this->getPrefix() !== null;
268 case "localName":
269 return true;
270 case "tagName":
271 return true;
272 case "id":
273 return true;
274 case "className":
275 return true;
276 case "classList":
277 return true;
278 case "slot":
279 return true;
280 case "attributes":
281 return true;
282 case "shadowRoot":
283 return $this->getShadowRoot() !== null;
284 case "outerHTML":
285 return true;
286 case "style":
287 return true;
288 case "contentEditable":
289 return true;
290 case "enterKeyHint":
291 return true;
292 case "isContentEditable":
293 return true;
294 case "inputMode":
295 return true;
296 case "onload":
297 return true;
298 case "dataset":
299 return true;
300 case "nonce":
301 return true;
302 case "tabIndex":
303 return true;
304 case "title":
305 return true;
306 case "lang":
307 return true;
308 case "translate":
309 return true;
310 case "dir":
311 return true;
312 case "hidden":
313 return true;
314 case "accessKey":
315 return true;
316 case "accessKeyLabel":
317 return true;
318 case "draggable":
319 return true;
320 case "spellcheck":
321 return true;
322 case "autocapitalize":
323 return true;
324 case "innerText":
325 return true;
326 case "offsetParent":
327 return $this->getOffsetParent() !== null;
328 case "offsetTop":
329 return true;
330 case "offsetLeft":
331 return true;
332 case "offsetWidth":
333 return true;
334 case "offsetHeight":
335 return true;
336 case "data":
337 return true;
338 case "type":
339 return true;
340 case "name":
341 return true;
342 case "useMap":
343 return true;
344 case "form":
345 return $this->getForm() !== null;
346 case "width":
347 return true;
348 case "height":
349 return true;
350 case "contentDocument":
351 return $this->getContentDocument() !== null;
352 case "willValidate":
353 return true;
354 case "validity":
355 return true;
356 case "validationMessage":
357 return true;
358 case "align":
359 return true;
360 case "archive":
361 return true;
362 case "code":
363 return true;
364 case "declare":
365 return true;
366 case "hspace":
367 return true;
368 case "standby":
369 return true;
370 case "vspace":
371 return true;
372 case "codeBase":
373 return true;
374 case "codeType":
375 return true;
376 case "border":
377 return true;
378 default:
379 break;
380 }
381 return false;
382 }
383
384 /**
385 * @param string $name
386 * @param mixed $value
387 */
388 public function __set( string $name, $value ): void {
389 '@phan-var \Wikimedia\IDLeDOM\HTMLObjectElement $this';
390 // @var \Wikimedia\IDLeDOM\HTMLObjectElement $this
391 switch ( $name ) {
392 case "nodeValue":
393 $this->setNodeValue( $value );
394 return;
395 case "textContent":
396 $this->setTextContent( $value );
397 return;
398 case "innerHTML":
399 $this->setInnerHTML( $value );
400 return;
401 case "id":
402 $this->setId( $value );
403 return;
404 case "className":
405 $this->setClassName( $value );
406 return;
407 case "classList":
408 $this->setClassList( $value );
409 return;
410 case "slot":
411 $this->setSlot( $value );
412 return;
413 case "outerHTML":
414 $this->setOuterHTML( $value );
415 return;
416 case "style":
417 $this->setStyle( $value );
418 return;
419 case "contentEditable":
420 $this->setContentEditable( $value );
421 return;
422 case "enterKeyHint":
423 $this->setEnterKeyHint( $value );
424 return;
425 case "inputMode":
426 $this->setInputMode( $value );
427 return;
428 case "onload":
429 $this->setOnload( $value );
430 return;
431 case "nonce":
432 $this->setNonce( $value );
433 return;
434 case "tabIndex":
435 $this->setTabIndex( $value );
436 return;
437 case "title":
438 $this->setTitle( $value );
439 return;
440 case "lang":
441 $this->setLang( $value );
442 return;
443 case "translate":
444 $this->setTranslate( $value );
445 return;
446 case "dir":
447 $this->setDir( $value );
448 return;
449 case "hidden":
450 $this->setHidden( $value );
451 return;
452 case "accessKey":
453 $this->setAccessKey( $value );
454 return;
455 case "draggable":
456 $this->setDraggable( $value );
457 return;
458 case "spellcheck":
459 $this->setSpellcheck( $value );
460 return;
461 case "autocapitalize":
462 $this->setAutocapitalize( $value );
463 return;
464 case "innerText":
465 $this->setInnerText( $value );
466 return;
467 case "data":
468 $this->setData( $value );
469 return;
470 case "type":
471 $this->setType( $value );
472 return;
473 case "name":
474 $this->setName( $value );
475 return;
476 case "useMap":
477 $this->setUseMap( $value );
478 return;
479 case "width":
480 $this->setWidth( $value );
481 return;
482 case "height":
483 $this->setHeight( $value );
484 return;
485 case "align":
486 $this->setAlign( $value );
487 return;
488 case "archive":
489 $this->setArchive( $value );
490 return;
491 case "code":
492 $this->setCode( $value );
493 return;
494 case "declare":
495 $this->setDeclare( $value );
496 return;
497 case "hspace":
498 $this->setHspace( $value );
499 return;
500 case "standby":
501 $this->setStandby( $value );
502 return;
503 case "vspace":
504 $this->setVspace( $value );
505 return;
506 case "codeBase":
507 $this->setCodeBase( $value );
508 return;
509 case "codeType":
510 $this->setCodeType( $value );
511 return;
512 case "border":
513 $this->setBorder( $value );
514 return;
515 default:
516 break;
517 }
518 '@phan-var \Wikimedia\IDLeDOM\Helper\HTMLObjectElement $this';
519 // @var \Wikimedia\IDLeDOM\Helper\HTMLObjectElement $this
520 $this->_setMissingProp( $name, $value );
521 }
522
523 /**
524 * @param string $name
525 */
526 public function __unset( string $name ): void {
527 '@phan-var \Wikimedia\IDLeDOM\HTMLObjectElement $this';
528 // @var \Wikimedia\IDLeDOM\HTMLObjectElement $this
529 switch ( $name ) {
530 case "nodeType":
531 break;
532 case "nodeName":
533 break;
534 case "baseURI":
535 break;
536 case "isConnected":
537 break;
538 case "ownerDocument":
539 break;
540 case "parentNode":
541 break;
542 case "parentElement":
543 break;
544 case "childNodes":
545 break;
546 case "firstChild":
547 break;
548 case "lastChild":
549 break;
550 case "previousSibling":
551 break;
552 case "nextSibling":
553 break;
554 case "nodeValue":
555 $this->setNodeValue( null );
556 return;
557 case "textContent":
558 $this->setTextContent( null );
559 return;
560 case "innerHTML":
561 break;
562 case "previousElementSibling":
563 break;
564 case "nextElementSibling":
565 break;
566 case "children":
567 break;
568 case "firstElementChild":
569 break;
570 case "lastElementChild":
571 break;
572 case "childElementCount":
573 break;
574 case "assignedSlot":
575 break;
576 case "namespaceURI":
577 break;
578 case "prefix":
579 break;
580 case "localName":
581 break;
582 case "tagName":
583 break;
584 case "id":
585 break;
586 case "className":
587 break;
588 case "classList":
589 break;
590 case "slot":
591 break;
592 case "attributes":
593 break;
594 case "shadowRoot":
595 break;
596 case "outerHTML":
597 break;
598 case "style":
599 break;
600 case "contentEditable":
601 break;
602 case "enterKeyHint":
603 break;
604 case "isContentEditable":
605 break;
606 case "inputMode":
607 break;
608 case "onload":
609 break;
610 case "dataset":
611 break;
612 case "nonce":
613 break;
614 case "tabIndex":
615 break;
616 case "title":
617 break;
618 case "lang":
619 break;
620 case "translate":
621 break;
622 case "dir":
623 break;
624 case "hidden":
625 break;
626 case "accessKey":
627 break;
628 case "accessKeyLabel":
629 break;
630 case "draggable":
631 break;
632 case "spellcheck":
633 break;
634 case "autocapitalize":
635 break;
636 case "innerText":
637 break;
638 case "offsetParent":
639 break;
640 case "offsetTop":
641 break;
642 case "offsetLeft":
643 break;
644 case "offsetWidth":
645 break;
646 case "offsetHeight":
647 break;
648 case "data":
649 break;
650 case "type":
651 break;
652 case "name":
653 break;
654 case "useMap":
655 break;
656 case "form":
657 break;
658 case "width":
659 break;
660 case "height":
661 break;
662 case "contentDocument":
663 break;
664 case "willValidate":
665 break;
666 case "validity":
667 break;
668 case "validationMessage":
669 break;
670 case "align":
671 break;
672 case "archive":
673 break;
674 case "code":
675 break;
676 case "declare":
677 break;
678 case "hspace":
679 break;
680 case "standby":
681 break;
682 case "vspace":
683 break;
684 case "codeBase":
685 break;
686 case "codeType":
687 break;
688 case "border":
689 break;
690 default:
691 return;
692 }
693 $trace = debug_backtrace();
694 while (
695 count( $trace ) > 0 &&
696 $trace[0]['function'] !== "__unset"
697 ) {
698 array_shift( $trace );
699 }
700 trigger_error(
701 'Undefined property' .
702 ' via ' . ( $trace[0]['function'] ?? '' ) . '(): ' . $name .
703 ' in ' . ( $trace[0]['file'] ?? '' ) .
704 ' on line ' . ( $trace[0]['line'] ?? '' ),
705 E_USER_NOTICE
706 );
707 }
708
709 /**
710 * @return string
711 */
712 public function getType(): string {
713 '@phan-var \Wikimedia\IDLeDOM\Element $this';
714 // @var \Wikimedia\IDLeDOM\Element $this
715 return $this->getAttribute( 'type' ) ?? '';
716 }
717
718 /**
719 * @param string $val
720 */
721 public function setType( string $val ): void {
722 '@phan-var \Wikimedia\IDLeDOM\Element $this';
723 // @var \Wikimedia\IDLeDOM\Element $this
724 $this->setAttribute( 'type', $val );
725 }
726
727 /**
728 * @return string
729 */
730 public function getName(): string {
731 '@phan-var \Wikimedia\IDLeDOM\Element $this';
732 // @var \Wikimedia\IDLeDOM\Element $this
733 return $this->getAttribute( 'name' ) ?? '';
734 }
735
736 /**
737 * @param string $val
738 */
739 public function setName( string $val ): void {
740 '@phan-var \Wikimedia\IDLeDOM\Element $this';
741 // @var \Wikimedia\IDLeDOM\Element $this
742 $this->setAttribute( 'name', $val );
743 }
744
745 /**
746 * @return string
747 */
748 public function getUseMap(): string {
749 '@phan-var \Wikimedia\IDLeDOM\Element $this';
750 // @var \Wikimedia\IDLeDOM\Element $this
751 return $this->getAttribute( 'usemap' ) ?? '';
752 }
753
754 /**
755 * @param string $val
756 */
757 public function setUseMap( string $val ): void {
758 '@phan-var \Wikimedia\IDLeDOM\Element $this';
759 // @var \Wikimedia\IDLeDOM\Element $this
760 $this->setAttribute( 'usemap', $val );
761 }
762
763 /**
764 * @return string
765 */
766 public function getWidth(): string {
767 '@phan-var \Wikimedia\IDLeDOM\Element $this';
768 // @var \Wikimedia\IDLeDOM\Element $this
769 return $this->getAttribute( 'width' ) ?? '';
770 }
771
772 /**
773 * @param string $val
774 */
775 public function setWidth( string $val ): void {
776 '@phan-var \Wikimedia\IDLeDOM\Element $this';
777 // @var \Wikimedia\IDLeDOM\Element $this
778 $this->setAttribute( 'width', $val );
779 }
780
781 /**
782 * @return string
783 */
784 public function getHeight(): string {
785 '@phan-var \Wikimedia\IDLeDOM\Element $this';
786 // @var \Wikimedia\IDLeDOM\Element $this
787 return $this->getAttribute( 'height' ) ?? '';
788 }
789
790 /**
791 * @param string $val
792 */
793 public function setHeight( string $val ): void {
794 '@phan-var \Wikimedia\IDLeDOM\Element $this';
795 // @var \Wikimedia\IDLeDOM\Element $this
796 $this->setAttribute( 'height', $val );
797 }
798
799 /**
800 * @return string
801 */
802 public function getAlign(): string {
803 '@phan-var \Wikimedia\IDLeDOM\Element $this';
804 // @var \Wikimedia\IDLeDOM\Element $this
805 return $this->getAttribute( 'align' ) ?? '';
806 }
807
808 /**
809 * @param string $val
810 */
811 public function setAlign( string $val ): void {
812 '@phan-var \Wikimedia\IDLeDOM\Element $this';
813 // @var \Wikimedia\IDLeDOM\Element $this
814 $this->setAttribute( 'align', $val );
815 }
816
817 /**
818 * @return string
819 */
820 public function getArchive(): string {
821 '@phan-var \Wikimedia\IDLeDOM\Element $this';
822 // @var \Wikimedia\IDLeDOM\Element $this
823 return $this->getAttribute( 'archive' ) ?? '';
824 }
825
826 /**
827 * @param string $val
828 */
829 public function setArchive( string $val ): void {
830 '@phan-var \Wikimedia\IDLeDOM\Element $this';
831 // @var \Wikimedia\IDLeDOM\Element $this
832 $this->setAttribute( 'archive', $val );
833 }
834
835 /**
836 * @return string
837 */
838 public function getCode(): string {
839 '@phan-var \Wikimedia\IDLeDOM\Element $this';
840 // @var \Wikimedia\IDLeDOM\Element $this
841 return $this->getAttribute( 'code' ) ?? '';
842 }
843
844 /**
845 * @param string $val
846 */
847 public function setCode( string $val ): void {
848 '@phan-var \Wikimedia\IDLeDOM\Element $this';
849 // @var \Wikimedia\IDLeDOM\Element $this
850 $this->setAttribute( 'code', $val );
851 }
852
853 /**
854 * @return bool
855 */
856 public function getDeclare(): bool {
857 '@phan-var \Wikimedia\IDLeDOM\Element $this';
858 // @var \Wikimedia\IDLeDOM\Element $this
859 return $this->hasAttribute( 'declare' );
860 }
861
862 /**
863 * @param bool $val
864 */
865 public function setDeclare( bool $val ): void {
866 '@phan-var \Wikimedia\IDLeDOM\Element $this';
867 // @var \Wikimedia\IDLeDOM\Element $this
868 if ( $val ) {
869 $this->setAttribute( 'declare', '' );
870 } else {
871 $this->removeAttribute( 'declare' );
872 }
873 }
874
875 /**
876 * @return string
877 */
878 public function getStandby(): string {
879 '@phan-var \Wikimedia\IDLeDOM\Element $this';
880 // @var \Wikimedia\IDLeDOM\Element $this
881 return $this->getAttribute( 'standby' ) ?? '';
882 }
883
884 /**
885 * @param string $val
886 */
887 public function setStandby( string $val ): void {
888 '@phan-var \Wikimedia\IDLeDOM\Element $this';
889 // @var \Wikimedia\IDLeDOM\Element $this
890 $this->setAttribute( 'standby', $val );
891 }
892
893 /**
894 * @return string
895 */
896 public function getCodeType(): string {
897 '@phan-var \Wikimedia\IDLeDOM\Element $this';
898 // @var \Wikimedia\IDLeDOM\Element $this
899 return $this->getAttribute( 'codetype' ) ?? '';
900 }
901
902 /**
903 * @param string $val
904 */
905 public function setCodeType( string $val ): void {
906 '@phan-var \Wikimedia\IDLeDOM\Element $this';
907 // @var \Wikimedia\IDLeDOM\Element $this
908 $this->setAttribute( 'codetype', $val );
909 }
910
911 /**
912 * @return string
913 */
914 public function getBorder(): string {
915 '@phan-var \Wikimedia\IDLeDOM\Element $this';
916 // @var \Wikimedia\IDLeDOM\Element $this
917 return $this->getAttribute( 'border' ) ?? '';
918 }
919
920 /**
921 * @param ?string $val
922 */
923 public function setBorder( ?string $val ): void {
924 '@phan-var \Wikimedia\IDLeDOM\Element $this';
925 // @var \Wikimedia\IDLeDOM\Element $this
926 $this->setAttribute( 'border', $val ?? '' );
927 }
928
929 }