1 | <?php declare(strict_types = 1); |
||
19 | class ParserSettings |
||
20 | { |
||
21 | const SYMBOL = 0b00000000; |
||
22 | const STRING = 0b00000001; |
||
23 | |||
24 | private $multipleSeparationType; |
||
25 | private $multipleSeparationSymbol; |
||
26 | private $multipleSeparationWord; |
||
27 | private $leadingSeparationString; |
||
28 | private $keepLeadingSeparator; |
||
29 | |||
30 | # Leading separator with capturing groups |
||
|
|||
31 | public static $leadingGroupSeparator = /* @lang text */ '/(.*)\s+(?:in)\s+(.*)/ui'; |
||
32 | public static $symbolSeparator = /* @lang text */ '/(?<first>[^,]*)\s?,\s?(?<next>.*)$/ui'; |
||
33 | public static $wordSeparator = /* @lang text */ '/^(?<first>.*?)\s?foo\s?(?<next>.*)$/ui'; |
||
34 | |||
35 | |||
36 | 22 | public function __construct( |
|
50 | |||
51 | 6 | public function getLeadingSeparator() : string |
|
55 | |||
56 | 4 | public function getSymbolSeparator() : string |
|
57 | { |
||
58 | 4 | return $this->multipleSeparationSymbol; |
|
59 | } |
||
60 | |||
61 | 4 | public function getWordSeparator() : string |
|
62 | { |
||
63 | 4 | return $this->multipleSeparationWord; |
|
64 | } |
||
65 | |||
66 | 4 | public function getLeadingSeparatorExpression() : string |
|
71 | |||
72 | 2 | public function getSymbolSeparatorExpression() : string |
|
73 | { |
||
77 | |||
78 | 2 | public function getWordSeparatorExpression() : string |
|
83 | |||
84 | 3 | public function keepLeadingSeparator() : bool |
|
88 | |||
89 | 3 | public function getSeparationType(): string |
|
93 | } |
||
94 |