| 1 | <?php |
||
| 7 | final class Matcher |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var ValueMatcher |
||
| 11 | */ |
||
| 12 | private $matcher; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param ValueMatcher $matcher |
||
| 16 | */ |
||
| 17 | public function __construct(ValueMatcher $matcher) |
||
| 18 | { |
||
| 19 | $this->matcher = $matcher; |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param mixed $value |
||
| 24 | * @param mixed $pattern |
||
| 25 | * @return bool |
||
| 26 | */ |
||
| 27 | public function match($value, $pattern) |
||
| 28 | { |
||
| 29 | return $this->matcher->match($value, $pattern); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return null|string |
||
| 34 | */ |
||
| 35 | public function getError() |
||
| 39 | } |
||
| 40 |