Moodle PHP Documentation 5.0
Moodle 5.0.1+ (Build: 20250711) (61af040cd5f)
Sabberworm\CSS\Settings Class Reference

Public Member Functions

 beStrict ()
 Configures the parser to choke on invalid rules.
 
 withDefaultCharset ($sDefaultCharset)
 Sets the charset to be used if the CSS does not contain an @charset declaration.
 
 withLenientParsing ($bLenientParsing=true)
 Configures whether the parser should silently ignore invalid rules.
 
 withMultibyteSupport ($bMultibyteSupport=true)
 Enables/disables multi-byte string support.
 

Static Public Member Functions

static create ()
 

Public Attributes

bool $bLenientParsing = true
 Whether the parser silently ignore invalid rules instead of choking on them.
 
bool $bMultibyteSupport
 Multi-byte string support.
 
string $sDefaultCharset = 'utf-8'
 The default charset for the CSS if no @charset declaration is found.
 

Member Function Documentation

◆ beStrict()

Sabberworm\CSS\Settings::beStrict ( )

Configures the parser to choke on invalid rules.

Return values
selffluent interface

◆ create()

static Sabberworm\CSS\Settings::create ( )
static
Return values
selfnew instance

◆ withDefaultCharset()

Sabberworm\CSS\Settings::withDefaultCharset ( $sDefaultCharset)

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

Parameters
string$sDefaultCharset
Return values
selffluent interface

◆ withLenientParsing()

Sabberworm\CSS\Settings::withLenientParsing ( $bLenientParsing = true)

Configures whether the parser should silently ignore invalid rules.

Parameters
bool$bLenientParsing
Return values
selffluent interface

◆ withMultibyteSupport()

Sabberworm\CSS\Settings::withMultibyteSupport ( $bMultibyteSupport = true)

Enables/disables multi-byte string support.

If true (mbstring extension must be enabled), will use (slower) mb_strlen, mb_convert_case, mb_substr and mb_strpos functions. Otherwise, the normal (ASCII-Only) functions will be used.

Parameters
bool$bMultibyteSupport
Return values
selffluent interface

Member Data Documentation

◆ $bMultibyteSupport

bool Sabberworm\CSS\Settings::$bMultibyteSupport

Multi-byte string support.

If true (mbstring extension must be enabled), will use (slower) mb_strlen, mb_convert_case, mb_substr and mb_strpos functions. Otherwise, the normal (ASCII-Only) functions will be used.

◆ $sDefaultCharset

string Sabberworm\CSS\Settings::$sDefaultCharset = 'utf-8'

The default charset for the CSS if no @charset declaration is found.

Defaults to utf-8.


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