Skip to content

Commit 4f00786

Browse files
authored
Update Parser.php
1 parent 82e230a commit 4f00786

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Parser/Parser.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ class Parser
1212

1313
protected $parsers = [];
1414

15+
public function __construct($parsers = null)
16+
{
17+
$this->parsers = $parsers === null ? $this->parsers : $parsers;
18+
}
19+
1520
protected function searchAndReplace(string $pattern, string $replace, string $source): string
1621
{
1722
while (preg_match($pattern, $source)) {

0 commit comments

Comments
 (0)