Parser
in package
This class parses CSS from text into a data structure.
Table of Contents
- $oParserState : ParserState
- __construct() : mixed
- getCharset() : void
- Returns the charset that is used if the CSS does not contain an `@charset` declaration.
- parse() : Document
- Parses the CSS provided to the constructor and creates a `Document` from it.
- setCharset() : void
- Sets the charset to be used if the CSS does not contain an `@charset` declaration.
Properties
$oParserState
private
ParserState
$oParserState
Methods
__construct()
public
__construct(string $sText[, Settings|null $oParserSettings = null ][, int $iLineNo = 1 ]) : mixed
Parameters
- $sText : string
-
the complete CSS as text (i.e., usually the contents of a CSS file)
- $oParserSettings : Settings|null = null
- $iLineNo : int = 1
-
the line number (starting from 1, not from 0)
Return values
mixed —getCharset()
Returns the charset that is used if the CSS does not contain an `@charset` declaration.
public
getCharset() : void
Tags
Return values
void —parse()
Parses the CSS provided to the constructor and creates a `Document` from it.
public
parse() : Document
Tags
Return values
Document —setCharset()
Sets the charset to be used if the CSS does not contain an `@charset` declaration.
public
setCharset(string $sCharset) : void
Parameters
- $sCharset : string
