oont-contents/plugins/mailpoet/vendor-prefixed/sabberworm/php-css-parser/src/Settings.php
2025-02-08 15:10:23 +01:00

36 lines
813 B
PHP

<?php
namespace MailPoetVendor\Sabberworm\CSS;
if (!defined('ABSPATH')) exit;
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);
}
}