| 1 | <?php |
||
| 11 | class MatchRegex implements PatternExpander |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var null|string |
||
| 15 | */ |
||
| 16 | private $error; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | private $pattern; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param string $pattern |
||
| 25 | */ |
||
| 26 | public function __construct($pattern) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param string $value |
||
| 41 | * |
||
| 42 | * @return boolean |
||
| 43 | */ |
||
| 44 | public function match($value) |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return string|null |
||
| 63 | */ |
||
| 64 | public function getError() |
||
| 68 | } |
||
| 69 |