| 1 | <?php |
||
| 10 | class ClosureMatcher implements Matcher |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * A closure which attempts to match the results. |
||
| 14 | * @var \Closure |
||
| 15 | */ |
||
| 16 | protected $closure; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Create a new matcher instance based on a closure. |
||
| 20 | * @param \Closure $closure The closure to use |
||
| 21 | */ |
||
| 22 | 3 | public function __construct(\Closure $closure) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @inheritDoc |
||
| 29 | */ |
||
| 30 | 2 | public function match($control, $trial) |
|
| 34 | } |
||
| 35 |