Debian Codegraph @

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