| 1 | <?php |
||
| 12 | class ScheduleRegistry |
||
| 13 | { |
||
| 14 | const ANNOTATION_CLASS = Schedule::class; |
||
| 15 | |||
| 16 | use ContainerAwareTrait; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | private $tasks = []; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var Reader |
||
| 25 | */ |
||
| 26 | private $reader; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param Reader $reader |
||
| 30 | */ |
||
| 31 | public function setReader(Reader $reader) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param string $id |
||
| 38 | */ |
||
| 39 | public function addTask($id) |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return Schedule[] |
||
| 46 | */ |
||
| 47 | public function getSchedules() |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @param string $taskId |
||
| 60 | * |
||
| 61 | * @return array |
||
| 62 | */ |
||
| 63 | private function getAnnotation($taskId) |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @param $annotation |
||
| 77 | * @param $task |
||
| 78 | */ |
||
| 79 | private function guardAgainstInvalidAnnotation($annotation, $task) |
||
| 91 | } |
||
| 92 |