1 | <?php |
||
25 | class StatusService { |
||
26 | |||
27 | /** |
||
28 | * |
||
29 | * @var ILogger |
||
30 | */ |
||
31 | private $logger; |
||
32 | |||
33 | /** |
||
34 | * |
||
35 | * @var string |
||
36 | */ |
||
37 | private $userId; |
||
38 | |||
39 | /** |
||
40 | * |
||
41 | * @var IL10N |
||
42 | */ |
||
43 | private $l10n; |
||
44 | |||
45 | /** |
||
46 | * |
||
47 | * @var OcrJobMapper |
||
48 | */ |
||
49 | private $jobMapper; |
||
50 | |||
51 | /** |
||
52 | * |
||
53 | * @var JobService |
||
54 | */ |
||
55 | private $jobService; |
||
56 | |||
57 | /** |
||
58 | * StatusService constructor. |
||
59 | * |
||
60 | * @param IL10N $l10n |
||
61 | * @param ILogger $logger |
||
62 | * @param string $userId |
||
63 | * @param OcrJobMapper $jobMapper |
||
64 | * @param JobService $jobService |
||
65 | */ |
||
66 | 3 | public function __construct(IL10N $l10n, ILogger $logger, $userId, OcrJobMapper $jobMapper, JobService $jobService) { |
|
73 | |||
74 | /** |
||
75 | * A function which returns the JSONResponse for all required status checks and tasks. |
||
76 | * It will check for already processed, pending and failed ocr tasks and return them as needed. |
||
77 | * |
||
78 | * @return string |
||
79 | */ |
||
80 | 1 | public function getStatus() { |
|
102 | |||
103 | /** |
||
104 | * Handle the possible thrown Exceptions from all methods of this class. |
||
105 | * |
||
106 | * @param Exception $e |
||
107 | * @throws Exception |
||
108 | * @throws NotFoundException |
||
109 | */ |
||
110 | private function handleException($e) { |
||
117 | } |