1 | <?php |
||
43 | abstract class AbstractQueueManager implements |
||
44 | QueueManagerInterface, |
||
45 | LoggerAwareInterface |
||
46 | { |
||
47 | use LoggerAwareTrait; |
||
48 | |||
49 | /** |
||
50 | * The queue ID. |
||
51 | * |
||
52 | * If set, then it will load only the items from this queue. |
||
53 | * If NULL, load *all* queued items. |
||
54 | * |
||
55 | * @var mixed $queueId |
||
56 | */ |
||
57 | private $queueId; |
||
58 | |||
59 | /** |
||
60 | * The callback routine when an item is processed (whether resolved or rejected). |
||
61 | * |
||
62 | * @var callable $itemCallback |
||
63 | */ |
||
64 | private $itemCallback; |
||
65 | |||
66 | /** |
||
67 | * The callback routine when the item is resolved. |
||
68 | * |
||
69 | * @var callable $itemSuccessCallback |
||
70 | */ |
||
71 | private $itemSuccessCallback; |
||
72 | |||
73 | /** |
||
74 | * The callback routine when the item is rejected. |
||
75 | * |
||
76 | * @var callable $itemFailureCallback |
||
77 | */ |
||
78 | private $itemFailureCallback; |
||
79 | |||
80 | /** |
||
81 | * The callback routine when the queue is processed. |
||
82 | * |
||
83 | * @var callable $processedCallback |
||
84 | */ |
||
85 | private $processedCallback; |
||
86 | |||
87 | /** |
||
88 | * @var FactoryInterface $queueItemFactory |
||
89 | */ |
||
90 | private $queueItemFactory; |
||
91 | |||
92 | /** |
||
93 | * Construct new queue manager. |
||
94 | * |
||
95 | * @param array $data Dependencies and settings. |
||
96 | */ |
||
97 | public function __construct(array $data = []) |
||
102 | |||
103 | /** |
||
104 | * @param FactoryInterface $factory The factory used to create queue items. |
||
105 | * @return QueueItemInterface Chainable |
||
106 | */ |
||
107 | protected function setQueueItemFactory(FactoryInterface $factory) |
||
112 | |||
113 | /** |
||
114 | * @return FactoryInterface |
||
115 | */ |
||
116 | protected function queueItemFactory() |
||
120 | |||
121 | /** |
||
122 | * Set the manager's data. |
||
123 | * |
||
124 | * @param array $data The queue data to set. |
||
125 | * @return AbstractQueueManager Chainable |
||
126 | */ |
||
127 | public function setData(array $data) |
||
135 | |||
136 | /** |
||
137 | * Set the queue's ID. |
||
138 | * |
||
139 | * @param mixed $id The unique queue identifier. |
||
140 | * @return AbstractQueueManager Chainable |
||
141 | */ |
||
142 | public function setQueueId($id) |
||
147 | |||
148 | /** |
||
149 | * Get the queue's ID. |
||
150 | * |
||
151 | * @return mixed |
||
152 | */ |
||
153 | public function queueId() |
||
157 | |||
158 | /** |
||
159 | * Set the callback routine when an item is processed. |
||
160 | * |
||
161 | * @param callable $callback A item callback routine. |
||
162 | * @return QueueManagerInterface Chainable |
||
163 | */ |
||
164 | public function setItemCallback(callable $callback) |
||
169 | |||
170 | /** |
||
171 | * Set the callback routine when the item is resolved. |
||
172 | * |
||
173 | * @param callable $callback A item callback routine. |
||
174 | * @return QueueManagerInterface Chainable |
||
175 | */ |
||
176 | public function setItemSuccessCallback(callable $callback) |
||
181 | |||
182 | /** |
||
183 | * Set the callback routine when the item is rejected. |
||
184 | * |
||
185 | * @param callable $callback A item callback routine. |
||
186 | * @return QueueManagerInterface Chainable |
||
187 | */ |
||
188 | public function setItemFailureCallback(callable $callback) |
||
193 | |||
194 | /** |
||
195 | * Set the callback routine when the queue is processed. |
||
196 | * |
||
197 | * @param callable $callback A queue callback routine. |
||
198 | * @return QueueManagerInterface Chainable |
||
199 | */ |
||
200 | public function setProcessedCallback(callable $callback) |
||
205 | |||
206 | /** |
||
207 | * Process the items of the queue. |
||
208 | * |
||
209 | * If no callback is passed and a self::$processedCallback is set, the latter is used. |
||
210 | * |
||
211 | * @param callable $callback An optional alternative callback routine executed |
||
212 | * after all queue items are processed. |
||
213 | * @return boolean Success / Failure |
||
214 | */ |
||
215 | public function processQueue(callable $callback = null) |
||
251 | |||
252 | /** |
||
253 | * Retrieve the items of the current queue. |
||
254 | * |
||
255 | * @return Collection |
||
256 | */ |
||
257 | public function loadQueueItems() |
||
290 | |||
291 | /** |
||
292 | * Retrieve the queue item's model. |
||
293 | * |
||
294 | * @return QueueItemInterface |
||
295 | */ |
||
296 | abstract public function queueItemProto(); |
||
297 | } |
||
298 |
Scrutinizer analyzes your
composer.json
/composer.lock
file if available to determine the classes, and functions that are defined by your dependencies.It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.