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