css-sanitizer
Classes to parse and sanitize CSS
|
A base interface for "CSS objects". More...
Public Member Functions | |
getPosition () | |
Get the position of this object in the input stream. | |
toTokenArray () | |
Return an array of Tokens that correspond to this object. | |
toComponentValueArray () | |
Return an array of ComponentValues that correspond to this object. | |
A base interface for "CSS objects".
Each object has a position and an ability to be turned into a sequence of Tokens.
Wikimedia\CSS\Objects\CSSObject::getPosition | ( | ) |
Get the position of this object in the input stream.
Position is reported as one-based line and one-based codepoint within the line. If no position is available, returns -1 for both line and position.
Implemented in Wikimedia\CSS\Objects\ComponentValue, Wikimedia\CSS\Objects\CSSObjectList, Wikimedia\CSS\Objects\Declaration, Wikimedia\CSS\Objects\Rule, and Wikimedia\CSS\Objects\Stylesheet.
Wikimedia\CSS\Objects\CSSObject::toComponentValueArray | ( | ) |
Return an array of ComponentValues that correspond to this object.
Implemented in Wikimedia\CSS\Objects\AtRule, Wikimedia\CSS\Objects\ComponentValue, Wikimedia\CSS\Objects\ComponentValueList, Wikimedia\CSS\Objects\CSSObjectList, Wikimedia\CSS\Objects\Declaration, Wikimedia\CSS\Objects\QualifiedRule, Wikimedia\CSS\Objects\Stylesheet, Wikimedia\CSS\Objects\Token, and Wikimedia\CSS\Objects\TokenList.
Wikimedia\CSS\Objects\CSSObject::toTokenArray | ( | ) |
Return an array of Tokens that correspond to this object.
Implemented in Wikimedia\CSS\Objects\AtRule, Wikimedia\CSS\Objects\CSSFunction, Wikimedia\CSS\Objects\CSSObjectList, Wikimedia\CSS\Objects\Declaration, Wikimedia\CSS\Objects\QualifiedRule, Wikimedia\CSS\Objects\SimpleBlock, Wikimedia\CSS\Objects\Stylesheet, Wikimedia\CSS\Objects\Token, and Wikimedia\CSS\Objects\TokenList.