laipower/wp-content/plugins/static-html-output-plugin/plugin/CSSParser/Settings.php

2 lines
762 B
PHP
Raw Normal View History

2020-04-07 13:03:04 +00:00
<?php
namespace Sabberworm\CSS; use Sabberworm\CSS\Rule\Rule; class Settings { public $bMultibyteSupport; public $sDefaultCharset = 'utf-8'; public $bLenientParsing = true; private function __construct() { $this->bMultibyteSupport = extension_loaded('mbstring'); } public static function create() { return new Settings(); } public function withMultibyteSupport($bMultibyteSupport = true) { $this->bMultibyteSupport = $bMultibyteSupport; return $this; } public function withDefaultCharset($sDefaultCharset) { $this->sDefaultCharset = $sDefaultCharset; return $this; } public function withLenientParsing($bLenientParsing = true) { $this->bLenientParsing = $bLenientParsing; return $this; } public function beStrict() { return $this->withLenientParsing(false); } }