| 1 | <?php |
||
| 12 | class CallableFilter implements FilterInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var callable Custom filter |
||
| 16 | */ |
||
| 17 | private $callable; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Set custom filter |
||
| 21 | * |
||
| 22 | * @param callable $callable Should take on argument and return a boolean |
||
| 23 | */ |
||
| 24 | public function __construct(callable $callable) |
||
| 28 | |||
| 29 | public function filter(\Traversable $documents): \Generator |
||
| 37 | } |
||
| 38 |