]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blob - vendor/wikimedia/css-sanitizer/src/Objects/ComponentValue.php
MediaWiki 1.30.2-scripts2
[autoinstalls/mediawiki.git] / vendor / wikimedia / css-sanitizer / src / Objects / ComponentValue.php
1 <?php
2 /**
3  * @file
4  * @license https://opensource.org/licenses/Apache-2.0 Apache-2.0
5  */
6
7 namespace Wikimedia\CSS\Objects;
8
9 /**
10  * Represent a CSS component value
11  */
12 abstract class ComponentValue implements CSSObject {
13
14         /** @var int Line and position in the input where this component value starts */
15         protected $line = -1, $pos = -1;
16
17         /**
18          * Get the position of this ComponentValue in the input stream
19          * @return array [ $line, $pos ]
20          */
21         public function getPosition() {
22                 return [ $this->line, $this->pos ];
23         }
24
25         public function toComponentValueArray() {
26                 return [ $this ];
27         }
28 }