Debian Codegraph @

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