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