| 1 | <?php |
||
| 22 | class TaskRegistry |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * @type TaskInterface[]|AbstractTask[] $tasks |
||
| 26 | */ |
||
| 27 | private $tasks; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param EventDispatcherInterface $dispatcher |
||
| 31 | * @param TaskInterface[]|AbstractTask[] $tasks |
||
| 32 | */ |
||
| 33 | public function __construct(EventDispatcherInterface $dispatcher, array $tasks) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param string $type |
||
| 50 | * |
||
| 51 | * @throws TaskNotFoundException |
||
| 52 | * @return TaskInterface|AbstractTask |
||
| 53 | */ |
||
| 54 | public function findTaskByType($type) |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @return AbstractTask[]|TaskInterface[] |
||
| 67 | */ |
||
| 68 | public function findAll() |
||
| 72 | } |
||
| 73 |