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