-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShippingController.php
More file actions
63 lines (54 loc) · 1.44 KB
/
ShippingController.php
File metadata and controls
63 lines (54 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
/* @author Undergraduate Group One
* Controller Object for Shipping use case
*/
include 'OrderStore.php';
include 'ShippingInterface.php';
include 'LegacyProductDBInterface.php';
class ShippingController
{
var $orderStore;
var $shippingInterface;
var $legacyInterface;
public function __construct()
{
$this->orderStore = new OrderStore();
$this->legacyInterface = new LegacyProductDBInterface();
$this->shippingInterface = new ShippingInterface();
}
public function getPendingOrders()
{
return $this->orderStore->searchByStatus("pending");
}
public function displayPendingOrders($rows)
{
$this->shippingInterface->displayPendingOrders($rows);
}
public function getOrderDetails($orderNum)
{
return $this->orderStore->getOrderDetails($orderNum);
}
//saves relevant info in session variables...
public function saveOrderDetails($rows)
{
$this->orderStore->saveOrderDetails($rows);
}
public function displayOrderDetails($rows)
{
$this->shippingInterface->displayOrderDetails($rows);
}
//gets part information from legacy DB
public function mergeOrderDetails($query)
{
return $this->partStore->accessDatabase($query);
}
public function shippingSearchDatabase($partNumArray)
{
return $this->legacyInterface->shippingSearchDatabase($partNumArray);
}
public function setShipped($orderNum)
{
return $this->orderStore->setShipped($orderNum);
}
}
?>