1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ShopperLibrary\ObjectModule; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Class PrestashopObjectModule |
7
|
|
|
* @package ShopperLibrary\ObjectModule |
8
|
|
|
*/ |
9
|
|
|
class PrestashopObjectModule extends ObjectModuleAbstract implements ObjectModuleInterface |
10
|
|
|
{ |
11
|
|
|
/** |
12
|
|
|
* @var bool |
13
|
|
|
*/ |
14
|
|
|
public $includeSimulator; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Prestashop Customer Object |
18
|
|
|
* |
19
|
|
|
* @var mixed |
20
|
|
|
*/ |
21
|
|
|
public $customer; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* Prestashop Cart Object |
25
|
|
|
* |
26
|
|
|
* @var mixed |
27
|
|
|
*/ |
28
|
|
|
public $cart; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* Prestashop Address Object |
32
|
|
|
* |
33
|
|
|
* @var mixed |
34
|
|
|
*/ |
35
|
|
|
public $psShippingAddress; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* Prestashop Address Object |
39
|
|
|
* |
40
|
|
|
* @var mixed |
41
|
|
|
*/ |
42
|
|
|
public $psBillingAddress; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @return bool |
46
|
|
|
*/ |
47
|
|
|
public function isIncludeSimulator() |
48
|
|
|
{ |
49
|
|
|
return $this->includeSimulator; |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @param bool $includeSimulator |
54
|
|
|
* |
55
|
|
|
* @return PrestashopObjectModule |
56
|
|
|
*/ |
57
|
|
|
public function setIncludeSimulator($includeSimulator) |
58
|
|
|
{ |
59
|
|
|
$this->includeSimulator = $includeSimulator; |
60
|
|
|
|
61
|
|
|
return $this; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @return mixed |
66
|
|
|
*/ |
67
|
|
|
public function getCustomer() |
68
|
|
|
{ |
69
|
|
|
return $this->customer; |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @param mixed $customer |
74
|
|
|
* |
75
|
|
|
* @return PrestashopObjectModule |
76
|
|
|
*/ |
77
|
|
|
public function setCustomer($customer) |
78
|
|
|
{ |
79
|
|
|
$this->customer = $customer; |
80
|
|
|
|
81
|
|
|
return $this; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @return mixed |
86
|
|
|
*/ |
87
|
|
|
public function getCart() |
88
|
|
|
{ |
89
|
|
|
return $this->cart; |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* @param mixed $cart |
94
|
|
|
* |
95
|
|
|
* @return PrestashopObjectModule |
96
|
|
|
*/ |
97
|
|
|
public function setCart($cart) |
98
|
|
|
{ |
99
|
|
|
$this->cart = $cart; |
100
|
|
|
|
101
|
|
|
return $this; |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* @return mixed |
106
|
|
|
*/ |
107
|
|
|
public function getPsShippingAddress() |
108
|
|
|
{ |
109
|
|
|
return $this->psShippingAddress; |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* @param mixed $psShippingAddress |
114
|
|
|
* |
115
|
|
|
* @return PrestashopObjectModule |
116
|
|
|
*/ |
117
|
|
|
public function setPsShippingAddress($psShippingAddress) |
118
|
|
|
{ |
119
|
|
|
$this->psShippingAddress = $psShippingAddress; |
120
|
|
|
|
121
|
|
|
return $this; |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* @return mixed |
126
|
|
|
*/ |
127
|
|
|
public function getPsBillingAddress() |
128
|
|
|
{ |
129
|
|
|
return $this->psBillingAddress; |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
/** |
133
|
|
|
* @param mixed $psBillingAddress |
134
|
|
|
* |
135
|
|
|
* @return PrestashopObjectModule |
136
|
|
|
*/ |
137
|
|
|
public function setPsBillingAddress($psBillingAddress) |
138
|
|
|
{ |
139
|
|
|
$this->psBillingAddress = $psBillingAddress; |
140
|
|
|
|
141
|
|
|
return $this; |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* I have nothing to prepare. |
146
|
|
|
*/ |
147
|
|
|
public function prepare() |
148
|
|
|
{ |
149
|
|
|
return; |
150
|
|
|
} |
151
|
|
|
} |
152
|
|
|
|