]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blob - vendor/oojs/oojs-ui/php/HtmlSnippet.php
MediaWiki 1.30.2-scripts
[autoinstallsdev/mediawiki.git] / vendor / oojs / oojs-ui / php / HtmlSnippet.php
1 <?php
2
3 namespace OOUI;
4
5 /**
6  * Wraps a HTML snippet for use with Tag::appendContent() and Tag::prependContent().
7  */
8 class HtmlSnippet {
9
10         /* Properties */
11
12         /**
13          * HTML snippet this instance represents.
14          *
15          * @var string
16          */
17         protected $content;
18
19         /* Methods */
20
21         /**
22          * @param string $content HTML snippet
23          */
24         public function __construct( $content ) {
25                 $this->content = $content;
26         }
27
28         /**
29          * Render into HTML.
30          *
31          * @return string Unchanged HTML snippet
32          */
33         public function __toString() {
34                 return $this->content;
35         }
36 }