Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250706) (a6b17d8f6bd)
Sabberworm\CSS\Parser Class Reference
Inheritance diagram for Sabberworm\CSS\Parser:
core_cssparser

Public Member Functions

 __construct ($sText, $oParserSettings=null, $iLineNo=1)
 
 getCharset ()
 Returns the charset that is used if the CSS does not contain an @charset declaration.
 
 parse ()
 Parses the CSS provided to the constructor and creates a Document from it.
 
 setCharset ($sCharset)
 Sets the charset to be used if the CSS does not contain an @charset declaration.
 

Constructor & Destructor Documentation

◆ __construct()

Sabberworm\CSS\Parser::__construct ( $sText,
$oParserSettings = null,
$iLineNo = 1 )
Parameters
string$sTextthe complete CSS as text (i.e., usually the contents of a CSS file)
Settings | null$oParserSettings
int$iLineNothe line number (starting from 1, not from 0)

Member Function Documentation

◆ getCharset()

Sabberworm\CSS\Parser::getCharset ( )

Returns the charset that is used if the CSS does not contain an @charset declaration.

Return values
void
Deprecated
since 8.7.0, will be removed in version 9.0.0 with #687

◆ parse()

Sabberworm\CSS\Parser::parse ( )

Parses the CSS provided to the constructor and creates a Document from it.

Return values
Document
Exceptions
SourceException

◆ setCharset()

Sabberworm\CSS\Parser::setCharset ( $sCharset)

Sets the charset to be used if the CSS does not contain an @charset declaration.

Parameters
string$sCharset
Return values
void
Deprecated
since 8.7.0, will be removed in version 9.0.0 with #687

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