Debian Codegraph @

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