| 1 | <?php |
||
| 5 | final class OrMatcher extends Matcher |
||
| 6 | { |
||
| 7 | const MATCH_PATTERN = "/\|\|/"; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @var ChainMatcher |
||
| 11 | */ |
||
| 12 | private $chainMatcher; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param ChainMatcher $chainMatcher |
||
| 16 | */ |
||
| 17 | public function __construct(ChainMatcher $chainMatcher) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * {@inheritDoc} |
||
| 24 | */ |
||
| 25 | public function match($value, $pattern) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Matches single pattern |
||
| 39 | * |
||
| 40 | * @param $value |
||
| 41 | * @param $pattern |
||
| 42 | * @return bool |
||
| 43 | */ |
||
| 44 | private function matchChild($value, $pattern) |
||
| 56 | |||
| 57 | /** |
||
| 58 | * {@inheritDoc} |
||
| 59 | */ |
||
| 60 | public function canMatch($pattern) |
||
| 64 | } |
||
| 65 |