| 1 | <?php |
||
| 8 | final class MatchRegex implements PatternExpander |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var null|string |
||
| 12 | */ |
||
| 13 | private $error; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | private $pattern; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param string $pattern |
||
| 22 | */ |
||
| 23 | public function __construct($pattern) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param string $value |
||
| 38 | * |
||
| 39 | * @return boolean |
||
| 40 | */ |
||
| 41 | public function match($value) |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return string|null |
||
| 60 | */ |
||
| 61 | public function getError() |
||
| 65 | } |
||
| 66 |