]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - vendor/wikimedia/css-sanitizer/src/Objects/ComponentValue.php
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / vendor / wikimedia / css-sanitizer / src / Objects / ComponentValue.php
diff --git a/vendor/wikimedia/css-sanitizer/src/Objects/ComponentValue.php b/vendor/wikimedia/css-sanitizer/src/Objects/ComponentValue.php
new file mode 100644 (file)
index 0000000..d22f520
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * @file
+ * @license https://opensource.org/licenses/Apache-2.0 Apache-2.0
+ */
+
+namespace Wikimedia\CSS\Objects;
+
+/**
+ * Represent a CSS component value
+ */
+abstract class ComponentValue implements CSSObject {
+
+       /** @var int Line and position in the input where this component value starts */
+       protected $line = -1, $pos = -1;
+
+       /**
+        * Get the position of this ComponentValue in the input stream
+        * @return array [ $line, $pos ]
+        */
+       public function getPosition() {
+               return [ $this->line, $this->pos ];
+       }
+
+       public function toComponentValueArray() {
+               return [ $this ];
+       }
+}