1 | <?php |
||
11 | class DoctrineStorage implements StorageInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var EntityManagerInterface |
||
15 | */ |
||
16 | private $entityManager; |
||
17 | |||
18 | /** |
||
19 | * @var TaskRepository |
||
20 | */ |
||
21 | private $taskRepository; |
||
22 | |||
23 | 33 | public function __construct(EntityManagerInterface $entityManager, TaskRepository $taskRepository) |
|
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | 30 | public function store(TaskInterface $task) |
|
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | 6 | public function findScheduled() |
|
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | 3 | public function findAll() |
|
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | 3 | public function persist(TaskInterface $task) |
|
78 | |||
79 | /** |
||
80 | * {@inheritdoc} |
||
81 | */ |
||
82 | 6 | public function clear() |
|
87 | |||
88 | 30 | private function setTask(TaskEntity $entity, TaskInterface $task) |
|
95 | } |
||
96 |