| 1 | <?php |
||
| 11 | class Filter implements PipeInterface |
||
| 12 | { |
||
| 13 | use IdentificationTrait; |
||
| 14 | /** |
||
| 15 | * @var FilterCallbackInterface |
||
| 16 | */ |
||
| 17 | private $callback; |
||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | private $identifier; |
||
| 22 | |||
| 23 | 3 | public function __construct(string $identifier, FilterCallbackInterface $callback) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Filtering handler. |
||
| 31 | * Terminate data flow based on a callback applied to DataBag. |
||
| 32 | * |
||
| 33 | * {@inheritdoc} |
||
| 34 | */ |
||
| 35 | 2 | public function pass(DataBagInterface $dataBag): DataBagInterface |
|
| 49 | } |
||
| 50 |