1 | <?php |
||
19 | class Builder |
||
20 | { |
||
21 | /** |
||
22 | * @var InputInterface |
||
23 | */ |
||
24 | protected $input; |
||
25 | |||
26 | /** |
||
27 | * @var Runner |
||
28 | */ |
||
29 | protected $runner; |
||
30 | |||
31 | /** |
||
32 | * @var Serializer |
||
33 | */ |
||
34 | protected $serializer; |
||
35 | |||
36 | /** |
||
37 | * @param array $config |
||
38 | */ |
||
39 | 9 | public function __construct(array $config = []) |
|
51 | |||
52 | /** |
||
53 | * Build and return a regular expression that matches all of the given strings |
||
54 | * |
||
55 | * @param string[] $strings Literal strings to be matched |
||
56 | * @return string Regular expression (without delimiters) |
||
57 | */ |
||
58 | 9 | public function build(array $strings) |
|
72 | |||
73 | /** |
||
74 | * Compare two split strings |
||
75 | * |
||
76 | * Will sort strings in ascending order |
||
77 | * |
||
78 | * @param integer[] $a |
||
79 | * @param integer[] $b |
||
80 | * @return integer |
||
81 | */ |
||
82 | 8 | protected function compareStrings(array $a, array $b) |
|
96 | |||
97 | /** |
||
98 | * Set the InputInterface instance in $this->input |
||
99 | * |
||
100 | * @param string $inputType |
||
101 | * @return void |
||
102 | */ |
||
103 | 9 | protected function setInput($inputType) |
|
108 | |||
109 | /** |
||
110 | * Set the Runner instance $in this->runner |
||
111 | * |
||
112 | * @return void |
||
113 | */ |
||
114 | 9 | protected function setRunner() |
|
124 | |||
125 | /** |
||
126 | * Set the Serializer instance in $this->serializer |
||
127 | * |
||
128 | * @param string $outputType |
||
129 | * @param string $delimiter |
||
130 | * @return void |
||
131 | */ |
||
132 | 9 | protected function setSerializer($outputType, $delimiter) |
|
140 | |||
141 | /** |
||
142 | * Split all given strings by character |
||
143 | * |
||
144 | * @param string[] $strings List of strings |
||
145 | * @return array[] List of arrays |
||
146 | */ |
||
147 | 8 | protected function splitStrings(array $strings) |
|
151 | } |