1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Neta\Shopware\SDK\Entity. |
4
|
|
|
* |
5
|
|
|
* Copyright 2016 LeadCommerce |
6
|
|
|
* |
7
|
|
|
* @author Alexander Mahrt <[email protected]> |
8
|
|
|
* @copyright 2016 LeadCommerce <[email protected]> |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace Neta\Shopware\SDK\Entity; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* Class Currency. |
15
|
|
|
*/ |
16
|
|
|
class Currency extends Base |
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* @var int |
20
|
|
|
*/ |
21
|
|
|
protected $id; |
22
|
|
|
/** |
23
|
|
|
* @var string |
24
|
|
|
*/ |
25
|
|
|
protected $currency; |
26
|
|
|
/** |
27
|
|
|
* @var string |
28
|
|
|
*/ |
29
|
|
|
protected $name; |
30
|
|
|
/** |
31
|
|
|
* @var bool |
32
|
|
|
*/ |
33
|
|
|
protected $default; |
34
|
|
|
/** |
35
|
|
|
* @var float |
36
|
|
|
*/ |
37
|
|
|
protected $factor; |
38
|
|
|
/** |
39
|
|
|
* @var string |
40
|
|
|
*/ |
41
|
|
|
protected $symbol; |
42
|
|
|
/** |
43
|
|
|
* @var int |
44
|
|
|
*/ |
45
|
|
|
protected $symbolPosition; |
46
|
|
|
/** |
47
|
|
|
* @var int |
48
|
|
|
*/ |
49
|
|
|
protected $position; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @return int |
53
|
|
|
*/ |
54
|
|
|
public function getId() |
55
|
|
|
{ |
56
|
|
|
return $this->id; |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* @param int $id |
61
|
|
|
* |
62
|
|
|
* @return Currency |
63
|
|
|
*/ |
64
|
|
|
public function setId($id) |
65
|
|
|
{ |
66
|
|
|
$this->id = $id; |
67
|
|
|
|
68
|
|
|
return $this; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @return string |
73
|
|
|
*/ |
74
|
|
|
public function getCurrency() |
75
|
|
|
{ |
76
|
|
|
return $this->currency; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* @param string $currency |
81
|
|
|
* |
82
|
|
|
* @return Currency |
83
|
|
|
*/ |
84
|
|
|
public function setCurrency($currency) |
85
|
|
|
{ |
86
|
|
|
$this->currency = $currency; |
87
|
|
|
|
88
|
|
|
return $this; |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @return string |
93
|
|
|
*/ |
94
|
|
|
public function getName() |
95
|
|
|
{ |
96
|
|
|
return $this->name; |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* @param string $name |
101
|
|
|
* |
102
|
|
|
* @return Currency |
103
|
|
|
*/ |
104
|
|
|
public function setName($name) |
105
|
|
|
{ |
106
|
|
|
$this->name = $name; |
107
|
|
|
|
108
|
|
|
return $this; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* @return bool |
113
|
|
|
*/ |
114
|
|
|
public function isDefault() |
115
|
|
|
{ |
116
|
|
|
return $this->default; |
117
|
|
|
} |
118
|
|
|
|
119
|
|
|
/** |
120
|
|
|
* @param bool $default |
121
|
|
|
* |
122
|
|
|
* @return Currency |
123
|
|
|
*/ |
124
|
|
|
public function setDefault($default) |
125
|
|
|
{ |
126
|
|
|
$this->default = $default; |
127
|
|
|
|
128
|
|
|
return $this; |
129
|
|
|
} |
130
|
|
|
|
131
|
|
|
/** |
132
|
|
|
* @return float |
133
|
|
|
*/ |
134
|
|
|
public function getFactor() |
135
|
|
|
{ |
136
|
|
|
return $this->factor; |
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
/** |
140
|
|
|
* @param float $factor |
141
|
|
|
* |
142
|
|
|
* @return Currency |
143
|
|
|
*/ |
144
|
|
|
public function setFactor($factor) |
145
|
|
|
{ |
146
|
|
|
$this->factor = $factor; |
147
|
|
|
|
148
|
|
|
return $this; |
149
|
|
|
} |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* @return string |
153
|
|
|
*/ |
154
|
|
|
public function getSymbol() |
155
|
|
|
{ |
156
|
|
|
return $this->symbol; |
157
|
|
|
} |
158
|
|
|
|
159
|
|
|
/** |
160
|
|
|
* @param string $symbol |
161
|
|
|
* |
162
|
|
|
* @return Currency |
163
|
|
|
*/ |
164
|
|
|
public function setSymbol($symbol) |
165
|
|
|
{ |
166
|
|
|
$this->symbol = $symbol; |
167
|
|
|
|
168
|
|
|
return $this; |
169
|
|
|
} |
170
|
|
|
|
171
|
|
|
/** |
172
|
|
|
* @return int |
173
|
|
|
*/ |
174
|
|
|
public function getSymbolPosition() |
175
|
|
|
{ |
176
|
|
|
return $this->symbolPosition; |
177
|
|
|
} |
178
|
|
|
|
179
|
|
|
/** |
180
|
|
|
* @param int $symbolPosition |
181
|
|
|
* |
182
|
|
|
* @return Currency |
183
|
|
|
*/ |
184
|
|
|
public function setSymbolPosition($symbolPosition) |
185
|
|
|
{ |
186
|
|
|
$this->symbolPosition = $symbolPosition; |
187
|
|
|
|
188
|
|
|
return $this; |
189
|
|
|
} |
190
|
|
|
|
191
|
|
|
/** |
192
|
|
|
* @return int |
193
|
|
|
*/ |
194
|
|
|
public function getPosition() |
195
|
|
|
{ |
196
|
|
|
return $this->position; |
197
|
|
|
} |
198
|
|
|
|
199
|
|
|
/** |
200
|
|
|
* @param int $position |
201
|
|
|
* |
202
|
|
|
* @return Currency |
203
|
|
|
*/ |
204
|
|
|
public function setPosition($position) |
205
|
|
|
{ |
206
|
|
|
$this->position = $position; |
207
|
|
|
|
208
|
|
|
return $this; |
209
|
|
|
} |
210
|
|
|
} |
211
|
|
|
|