PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 10.1.4
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v10.1.4
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
acymailing / back / Libraries / Sabberworm / CSS / src / Settings.php

Settings.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 10.1.4, at back/Libraries/Sabberworm/CSS/src/Settings.php

90 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Sabberworm\CSS;
4
5 /**
6 * Parser settings class.
7 *
8 * Configure parser behaviour here.
9 */
10 class Settings
11 {
12 /**
13 * Multi-byte string support.
14 * If true (mbstring extension must be enabled), will use (slower) `mb_strlen`, `mb_convert_case`, `mb_substr`
15 * and `mb_strpos` functions. Otherwise, the normal (ASCII-Only) functions will be used.
16 *
17 * @var bool
18 */
19 public $bMultibyteSupport;
20
21 /**
22 * The default charset for the CSS if no `@charset` rule is found. Defaults to utf-8.
23 *
24 * @var string
25 */
26 public $sDefaultCharset = 'utf-8';
27
28 /**
29 * Lenient parsing. When used (which is true by default), the parser will not choke
30 * on unexpected tokens but simply ignore them.
31 *
32 * @var bool
33 */
34 public $bLenientParsing = true;
35
36 private function __construct()
37 {
38 $this->bMultibyteSupport = extension_loaded('mbstring');
39 }
40
41 /**
42 * @return self new instance
43 */
44 public static function create()
45 {
46 return new Settings();
47 }
48
49 /**
50 * @param bool $bMultibyteSupport
51 *
52 * @return self fluent interface
53 */
54 public function withMultibyteSupport($bMultibyteSupport = true)
55 {
56 $this->bMultibyteSupport = $bMultibyteSupport;
57 return $this;
58 }
59
60 /**
61 * @param string $sDefaultCharset
62 *
63 * @return self fluent interface
64 */
65 public function withDefaultCharset($sDefaultCharset)
66 {
67 $this->sDefaultCharset = $sDefaultCharset;
68 return $this;
69 }
70
71 /**
72 * @param bool $bLenientParsing
73 *
74 * @return self fluent interface
75 */
76 public function withLenientParsing($bLenientParsing = true)
77 {
78 $this->bLenientParsing = $bLenientParsing;
79 return $this;
80 }
81
82 /**
83 * @return self fluent interface
84 */
85 public function beStrict()
86 {
87 return $this->withLenientParsing(false);
88 }
89 }
90