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