| 1 | <?php |
||
| 6 | class ClosureWorker implements WorkerInterface |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var \Closure |
||
| 10 | */ |
||
| 11 | private $closure; |
||
| 12 | |||
| 13 | public function __construct(\Closure $closure) |
||
| 14 | { |
||
| 15 | $this->closure = $closure; |
||
| 16 | } |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param $message |
||
| 20 | * @return mixed |
||
| 21 | */ |
||
| 22 | public function __invoke($message) |
||
| 28 | } |
||
| 29 |