1 | <?php |
||
9 | class UploadFormDataFactory |
||
10 | { |
||
11 | /** |
||
12 | * @var FieldNoteService |
||
|
|||
13 | */ |
||
14 | private $fieldNoteService; |
||
15 | |||
16 | /** |
||
17 | * @var GeoCacheLogService |
||
18 | */ |
||
19 | private $geoCacheLogService; |
||
20 | |||
21 | /** |
||
22 | * @param FieldNoteService $fieldNoteService |
||
23 | * @param GeoCacheLogService $geoCacheLogService |
||
24 | */ |
||
25 | public function __construct(FieldNoteService $fieldNoteService, GeoCacheLogService $geoCacheLogService) |
||
30 | |||
31 | /** |
||
32 | * Creates a UploadFormData by given user id. |
||
33 | * |
||
34 | * @param int $userId |
||
35 | * |
||
36 | * @return UploadFormData |
||
37 | */ |
||
38 | public function create($userId) |
||
47 | |||
48 | /** |
||
49 | * Fetches the latest log or field note date. |
||
50 | * |
||
51 | * @param int $userId |
||
52 | * |
||
53 | * @return string |
||
54 | */ |
||
55 | private function getLatestLogOrFieldNoteDate($userId) |
||
63 | |||
64 | /** |
||
65 | * @param $userId |
||
66 | * |
||
67 | * @return DateTime|null |
||
68 | */ |
||
69 | private function getLatestLogDate($userId) |
||
80 | |||
81 | /** |
||
82 | * Fetches the latest field note date. |
||
83 | * |
||
84 | * @param $userId |
||
85 | * |
||
86 | * @return DateTime|null |
||
87 | */ |
||
88 | private function getLatestFieldNoteDate($userId) |
||
99 | } |
||
100 |