css-sanitizer
Classes to parse and sanitize CSS
Wikimedia\CSS\Objects\Stylesheet Class Reference

Represent a stylesheet. More...

+ Inheritance diagram for Wikimedia\CSS\Objects\Stylesheet:
+ Collaboration diagram for Wikimedia\CSS\Objects\Stylesheet:

Public Member Functions

 __construct (RuleList $rules=null)
 
 __clone ()
 
 getRuleList ()
 
 getPosition ()
 @inheritDoc
 
 toTokenArray ()
 @inheritDoc
 
 toComponentValueArray ()
 @inheritDoc
 
 __toString ()
 

Protected Attributes

 $ruleList
 

Detailed Description

Represent a stylesheet.

Note
This isn't necessarily a "CSS stylesheet" though.
Warning
If you're not using the provided Sanitizer classes to further sanitize the CSS, you'll want to manually filter out any at-rules named "charset" before stringifying and/or prepend @charset "utf-8"; after stringifying this object.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\CSS\Objects\Stylesheet::__construct ( RuleList  $rules = null)
Parameters
RuleList | null$rules

Member Function Documentation

◆ getRuleList()

Wikimedia\CSS\Objects\Stylesheet::getRuleList ( )
Returns
RuleList

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