css-sanitizer
Classes to parse and sanitize CSS
Wikimedia\CSS\Objects\CSSObject Interface Reference

A base interface for "CSS objects". More...

+ Inheritance diagram for Wikimedia\CSS\Objects\CSSObject:

Public Member Functions

 getPosition ()
 Get the position of this object in the input stream. More...
 
 toTokenArray ()
 Return an array of Tokens that correspond to this object. More...
 
 toComponentValueArray ()
 Return an array of ComponentValues that correspond to this object. More...
 

Detailed Description

A base interface for "CSS objects".

Each object has a position and an ability to be turned into a sequence of Tokens.

Member Function Documentation

◆ getPosition()

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.

Returns
array [ $line, $pos ]

Implemented in Wikimedia\CSS\Objects\Stylesheet, Wikimedia\CSS\Objects\Rule, Wikimedia\CSS\Objects\Declaration, Wikimedia\CSS\Objects\CSSObjectList, and Wikimedia\CSS\Objects\ComponentValue.

◆ toComponentValueArray()

Wikimedia\CSS\Objects\CSSObject::toComponentValueArray ( )

◆ toTokenArray()


The documentation for this interface was generated from the following file: