1 | <?php |
||
77 | class EcommerceDatabaseAdmin extends TaskRunner |
||
78 | { |
||
79 | |||
80 | |||
81 | //############################## |
||
82 | // BASIC FUNCTIONS |
||
83 | //############################## |
||
84 | |||
85 | public function index() |
||
100 | |||
101 | /** |
||
102 | * standard, required method. |
||
103 | * |
||
104 | * @param string $action |
||
105 | * |
||
106 | * @return string link for the "Controller" |
||
107 | */ |
||
108 | public function Link($action = null) |
||
116 | |||
117 | //############################## |
||
118 | // 0. OVERALL CONFIG |
||
119 | //############################## |
||
120 | |||
121 | /** |
||
122 | * List of overall configuration BuildTasks. |
||
123 | * |
||
124 | * @var array |
||
125 | */ |
||
126 | protected $overallconfig = array( |
||
127 | 'ecommercetaskcheckconfiguration', |
||
128 | 'ecommercetaskapiandmore', |
||
129 | ); |
||
130 | |||
131 | /** |
||
132 | * list of config tasks. |
||
133 | * |
||
134 | * @return ArrayList |
||
135 | */ |
||
136 | public function OverallConfig() |
||
140 | |||
141 | //############################## |
||
142 | // 1. ECOMMERCE SETUP (DEFAULT RECORDS) |
||
143 | //############################## |
||
144 | |||
145 | /** |
||
146 | * List of setup BuildTasks. |
||
147 | * |
||
148 | * @var array |
||
149 | */ |
||
150 | protected $ecommerceSetup = array( |
||
151 | 'ecommercetasksetorderidstartingnumber', |
||
152 | 'ecommercetaskcreatemembergroups', |
||
153 | 'ecommercetaskdefaultrecords', |
||
154 | 'ecommercetaskcountryandregion', |
||
155 | 'ecommercetaskcountryandregion_disallowallcountries', |
||
156 | 'ecommercetaskcountryandregion_allowallcountries', |
||
157 | 'ecommercetaskadddefaultproducts', |
||
158 | 'ecommercetasklinkproductwithimages', |
||
159 | ); |
||
160 | |||
161 | /** |
||
162 | * list of data setup tasks. |
||
163 | * |
||
164 | * @return ArrayList |
||
165 | */ |
||
166 | public function EcommerceSetup() |
||
170 | |||
171 | //############################## |
||
172 | // 2. DATA REVIEW MAINTENANCE |
||
173 | //############################## |
||
174 | |||
175 | /** |
||
176 | * List of regular maintenance BuildTasks. |
||
177 | * |
||
178 | * @var array |
||
179 | */ |
||
180 | protected $dataReview = array( |
||
181 | 'ecommercetaskreviewreports', |
||
182 | 'ecommercetaskreviewsearches', |
||
183 | 'ecommercetaskorderitemspercustomer' |
||
184 | ); |
||
185 | |||
186 | /** |
||
187 | * regular data cleanup tasks. |
||
188 | * |
||
189 | * @return ArrayList |
||
190 | */ |
||
191 | public function DataReview() |
||
195 | |||
196 | //############################## |
||
197 | // 3. REGULAR MAINTENANCE |
||
198 | //############################## |
||
199 | |||
200 | /** |
||
201 | * List of regular maintenance BuildTasks. |
||
202 | * |
||
203 | * @var array |
||
204 | */ |
||
205 | protected $regularMaintenance = array( |
||
206 | 'ecommercetaskcartcleanup', |
||
207 | 'ecommercetaskaddcustomerstocustomergroups', |
||
208 | 'ecommercetaskfixbrokenordersubmissiondata', |
||
209 | 'ecommercetaskcleanupproductfullsitetreesorting', |
||
210 | 'ecommercetaskproductvariationsfixes', |
||
211 | 'ecommercetaskproductimagereset', |
||
212 | 'ecommercetasktrytofinaliseorders', |
||
213 | 'ecommercetaskprocessorderqueue', |
||
214 | 'ecommercetaskarchiveallsubmittedorders', |
||
215 | 'ecommercetasklinkorderaddressesatbothends', |
||
216 | 'EcommerceTaskCleanupProducts' |
||
217 | ); |
||
218 | |||
219 | /** |
||
220 | * regular data cleanup tasks. |
||
221 | * |
||
222 | * @return ArrayList |
||
223 | */ |
||
224 | public function RegularMaintenance() |
||
228 | |||
229 | //############################## |
||
230 | // 4. DEBUG ACTIONS |
||
231 | //############################## |
||
232 | |||
233 | /** |
||
234 | * List of debug actions BuildTasks. |
||
235 | * |
||
236 | * @var array |
||
237 | */ |
||
238 | protected $debugActions = array( |
||
239 | 'ecommercetasktemplatetest', |
||
240 | 'ecommercetaskcartmanipulation_current', |
||
241 | 'ecommercetaskcartmanipulation_debug', |
||
242 | 'ecommercetaskbuilding_model', |
||
243 | 'ecommercetaskbuilding_extending', |
||
244 | ); |
||
245 | |||
246 | /** |
||
247 | * list of data debug actions. |
||
248 | * |
||
249 | * @return ArrayList |
||
250 | */ |
||
251 | public function DebugActions() |
||
255 | |||
256 | //############################## |
||
257 | // 5. MIGRATIONS |
||
258 | //############################## |
||
259 | |||
260 | /** |
||
261 | * List of migration BuildTasks. |
||
262 | * |
||
263 | * @var array |
||
264 | */ |
||
265 | protected $migrations = array( |
||
266 | 'ecommercetaskmigration', |
||
267 | 'ecommercetaskcheckconfiguration', |
||
268 | 'ecommercetasksetdefaultproductgroupvalues', |
||
269 | ); |
||
270 | |||
271 | /** |
||
272 | * list of migration tasks. |
||
273 | * |
||
274 | * @return ArrayList |
||
275 | */ |
||
276 | public function Migrations() |
||
280 | |||
281 | //############################## |
||
282 | // 6. CRAZY SHIT |
||
283 | //############################## |
||
284 | |||
285 | /** |
||
286 | * List of crazy shit BuildTasks. |
||
287 | * |
||
288 | * @var array |
||
289 | */ |
||
290 | protected $crazyshit = array( |
||
291 | 'ecommercetaskdeleteallorders', |
||
292 | 'ecommercetaskdeleteproducts', |
||
293 | 'ecommercetaskarchiveallorderswithitems', |
||
294 | ); |
||
295 | |||
296 | /** |
||
297 | * list of crazy actions tasks. |
||
298 | * |
||
299 | * @return ArrayList |
||
300 | */ |
||
301 | public function CrazyShit() |
||
305 | |||
306 | //############################## |
||
307 | // 7. TESTS |
||
308 | //############################## |
||
309 | |||
310 | /** |
||
311 | * List of tests. |
||
312 | * |
||
313 | * @var array |
||
314 | */ |
||
315 | protected $tests = array( |
||
316 | //'ShoppingCartTest' => 'Shopping Cart' |
||
317 | ); |
||
318 | |||
319 | public function Tests() |
||
335 | |||
336 | /** |
||
337 | * @return array ???? |
||
338 | */ |
||
339 | public function AllTests() |
||
343 | |||
344 | //############################## |
||
345 | // INTERNAL FUNCTIONS |
||
346 | //############################## |
||
347 | |||
348 | /** |
||
349 | * @param array $buildTasksArray array of build tasks |
||
350 | * @param string $type |
||
351 | * |
||
352 | * @return ArrayList(ArrayData(Link, Title, Description)) |
||
353 | */ |
||
354 | protected function createMenuDOSFromArray(array $buildTasksArray, $type = '') |
||
378 | |||
379 | public function runTask($request) |
||
413 | |||
414 | /** |
||
415 | * shows a "Task Completed Message" on the screen. |
||
416 | * |
||
417 | * @param BuildTask $buildTask |
||
418 | * @param string $extraMessage |
||
419 | */ |
||
420 | protected function displayCompletionMessage(BuildTask $buildTask, $extraMessage = '') |
||
432 | } |
||
433 | |||
451 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.