Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
AbstractTaskAdapter | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
|||
schedule | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | |||||
getTasks | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | |||||
getTask | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | |||||
updateTask | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | |||||
removeTask | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | |||||
getTaskCount | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | |||||
hasTasks | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | |||||
clearTasks | n/a |
0 / 0 |
n/a |
0 / 0 |
0 |
1 | <?php |
2 | /** |
3 | * Pop PHP Framework (http://www.popphp.org/) |
4 | * |
5 | * @link https://github.com/popphp/popphp-framework |
6 | * @author Nick Sagona, III <dev@nolainteractive.com> |
7 | * @copyright Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
8 | * @license http://www.popphp.org/license New BSD License |
9 | */ |
10 | |
11 | /** |
12 | * @namespace |
13 | */ |
14 | namespace Pop\Queue\Adapter; |
15 | |
16 | use Pop\Queue\Process\Task; |
17 | |
18 | /** |
19 | * Adapter abstract class |
20 | * |
21 | * @category Pop |
22 | * @package Pop\Queue |
23 | * @author Nick Sagona, III <dev@nolainteractive.com> |
24 | * @copyright Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
25 | * @license http://www.popphp.org/license New BSD License |
26 | * @version 2.0.0 |
27 | */ |
28 | abstract class AbstractTaskAdapter extends AbstractAdapter implements TaskAdapterInterface |
29 | { |
30 | |
31 | /** |
32 | * Schedule job with queue |
33 | * |
34 | * @param Task $task |
35 | * @return AbstractTaskAdapter |
36 | */ |
37 | abstract public function schedule(Task $task): AbstractTaskAdapter; |
38 | |
39 | /** |
40 | * Get scheduled tasks |
41 | * |
42 | * @return array |
43 | */ |
44 | abstract public function getTasks(): array; |
45 | |
46 | /** |
47 | * Get scheduled task |
48 | * |
49 | * @param string $taskId |
50 | * @return ?Task |
51 | */ |
52 | abstract public function getTask(string $taskId): ?Task; |
53 | |
54 | /** |
55 | * Update scheduled task |
56 | * |
57 | * @param Task $task |
58 | * @return AbstractTaskAdapter |
59 | */ |
60 | abstract public function updateTask(Task $task): AbstractTaskAdapter; |
61 | |
62 | /** |
63 | * Remove scheduled task |
64 | * |
65 | * @param string $taskId |
66 | * @return AbstractTaskAdapter |
67 | */ |
68 | abstract public function removeTask(string $taskId): AbstractTaskAdapter; |
69 | |
70 | /** |
71 | * Get scheduled tasks count |
72 | * |
73 | * @return int |
74 | */ |
75 | abstract public function getTaskCount(): int; |
76 | |
77 | /** |
78 | * Has scheduled tasks |
79 | * |
80 | * @return bool |
81 | */ |
82 | abstract public function hasTasks(): bool; |
83 | |
84 | /** |
85 | * Clear all scheduled task |
86 | * |
87 | * @return AbstractTaskAdapter |
88 | */ |
89 | abstract public function clearTasks(): AbstractTaskAdapter; |
90 | |
91 | } |