]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - vendor/oojs/oojs-ui/php/HtmlSnippet.php
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / vendor / oojs / oojs-ui / php / HtmlSnippet.php
diff --git a/vendor/oojs/oojs-ui/php/HtmlSnippet.php b/vendor/oojs/oojs-ui/php/HtmlSnippet.php
new file mode 100644 (file)
index 0000000..6ffe908
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+
+namespace OOUI;
+
+/**
+ * Wraps a HTML snippet for use with Tag::appendContent() and Tag::prependContent().
+ */
+class HtmlSnippet {
+
+       /* Properties */
+
+       /**
+        * HTML snippet this instance represents.
+        *
+        * @var string
+        */
+       protected $content;
+
+       /* Methods */
+
+       /**
+        * @param string $content HTML snippet
+        */
+       public function __construct( $content ) {
+               $this->content = $content;
+       }
+
+       /**
+        * Render into HTML.
+        *
+        * @return string Unchanged HTML snippet
+        */
+       public function __toString() {
+               return $this->content;
+       }
+}