]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - vendor/wikimedia/remex-html/RemexHtml/Serializer/SerializerNode.php
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / vendor / wikimedia / remex-html / RemexHtml / Serializer / SerializerNode.php
diff --git a/vendor/wikimedia/remex-html/RemexHtml/Serializer/SerializerNode.php b/vendor/wikimedia/remex-html/RemexHtml/Serializer/SerializerNode.php
new file mode 100644 (file)
index 0000000..2944732
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+namespace RemexHtml\Serializer;
+use RemexHtml\PropGuard;
+
+class SerializerNode {
+       public $id;
+       public $parentId;
+       public $namespace;
+       public $name;
+       public $attrs;
+       public $void;
+       public $children = [];
+
+       /**
+        * Arbitrary user data can be placed here.
+        */
+       public $snData;
+
+       public function __construct( $id, $parentId, $namespace, $name, $attrs, $void ) {
+               $this->id = $id;
+               $this->parentId = $parentId;
+               $this->namespace = $namespace;
+               $this->name = $name;
+               $this->attrs = $attrs;
+               $this->void = $void;
+       }
+
+       public function __set( $name, $value ) {
+               PropGuard::set( $this, $name, $value );
+       }
+}