1 | <?php |
||
5 | abstract class PriorityJobManager extends AbstractJobManager |
||
6 | { |
||
7 | const PRIORITY_ASC = 'asc'; |
||
8 | const PRIORITY_DESC = 'desc'; |
||
9 | |||
10 | protected $maxPriority; |
||
11 | protected $priorityDirection = self::PRIORITY_DESC; |
||
12 | |||
13 | /** |
||
14 | * @return mixed |
||
15 | */ |
||
16 | 19 | public function getMaxPriority() |
|
20 | |||
21 | /** |
||
22 | * @param mixed $maxPriority |
||
23 | */ |
||
24 | 11 | public function setMaxPriority($maxPriority) |
|
28 | |||
29 | /** |
||
30 | * @return mixed |
||
31 | */ |
||
32 | 10 | public function getPriorityDirection() |
|
36 | |||
37 | /** |
||
38 | * @param mixed $priorityDirection |
||
39 | */ |
||
40 | 13 | public function setPriorityDirection($priorityDirection) |
|
44 | |||
45 | 37 | protected function validatePriority($priority) |
|
62 | |||
63 | 37 | protected function calculatePriority($priority) |
|
74 | |||
75 | protected function findHigherPriority($priority1, $priority2) |
||
90 | |||
91 | abstract protected function prioritySave(Job $job); |
||
92 | |||
93 | 37 | public function save(Job $job) |
|
102 | } |
||
103 |