| 1 | <?php |
||
| 10 | class RegexpParser implements ParserInterface |
||
| 11 | { |
||
| 12 | /** @var string $regexp regexp for matching */ |
||
| 13 | private $regexp; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * constructor |
||
| 17 | * |
||
| 18 | * @param string $regexp regexp for matching |
||
| 19 | */ |
||
| 20 | 40 | public function __construct($regexp) |
|
| 24 | |||
| 25 | /** |
||
| 26 | * parse given `$source` and return substring result |
||
| 27 | * |
||
| 28 | * @param Source $source parser input |
||
| 29 | * @return array |
||
| 30 | * @throws UnserializeFailedException |
||
| 31 | */ |
||
| 32 | 22 | public function parse(Source $source) |
|
| 37 | } |
||
| 38 |