1 | <?php |
||
31 | class Cart extends AbstractEntity implements PurchaseInterface, ItemHolderInterface |
||
32 | { |
||
33 | use PointTrait; |
||
34 | |||
35 | /** |
||
36 | * @var integer |
||
37 | * |
||
38 | * @ORM\Column(name="id", type="integer", options={"unsigned":true}) |
||
39 | * @ORM\Id |
||
40 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
41 | */ |
||
42 | private $id; |
||
43 | |||
44 | /** |
||
45 | * @var string |
||
46 | * |
||
47 | * @ORM\Column(name="cart_key", type="string", options={"unsigned":true}, nullable=true) |
||
48 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
49 | */ |
||
50 | private $cart_key; |
||
51 | |||
52 | /** |
||
53 | * @var \Eccube\Entity\Customer |
||
54 | * |
||
55 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Customer") |
||
56 | * @ORM\JoinColumns({ |
||
57 | * @ORM\JoinColumn(name="customer_id", referencedColumnName="id") |
||
58 | * }) |
||
59 | */ |
||
60 | private $Customer; |
||
61 | |||
62 | /** |
||
63 | * @var bool |
||
64 | */ |
||
65 | private $lock = false; |
||
66 | |||
67 | /** |
||
68 | * @var \Doctrine\Common\Collections\Collection|CartItem[] |
||
69 | * |
||
70 | * @ORM\OneToMany(targetEntity="Eccube\Entity\CartItem", mappedBy="Cart", cascade={"persist"}) |
||
71 | */ |
||
72 | private $CartItems; |
||
73 | |||
74 | /** |
||
75 | * @var string|null |
||
76 | * |
||
77 | * @ORM\Column(name="pre_order_id", type="string", length=255, nullable=true) |
||
78 | */ |
||
79 | private $pre_order_id = null; |
||
80 | |||
81 | /** |
||
82 | * @var string |
||
83 | * |
||
84 | * @ORM\Column(name="total_price", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
85 | */ |
||
86 | private $total_price; |
||
87 | |||
88 | /** |
||
89 | * @var string |
||
90 | * |
||
91 | * @ORM\Column(name="delivery_fee_total", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
92 | */ |
||
93 | private $delivery_fee_total; |
||
94 | |||
95 | /** |
||
96 | * @var int|null |
||
97 | * |
||
98 | * @ORM\Column(name="sort_no", type="smallint", nullable=true, options={"unsigned":true}) |
||
99 | */ |
||
100 | private $sort_no; |
||
101 | |||
102 | /** |
||
103 | * @var \DateTime |
||
104 | * |
||
105 | * @ORM\Column(name="create_date", type="datetimetz") |
||
106 | */ |
||
107 | private $create_date; |
||
108 | |||
109 | /** |
||
110 | * @var \DateTime |
||
111 | * |
||
112 | * @ORM\Column(name="update_date", type="datetimetz") |
||
113 | */ |
||
114 | private $update_date; |
||
115 | |||
116 | /** |
||
117 | * @var InvalidItemException[] |
||
118 | */ |
||
119 | private $errors = []; |
||
120 | |||
121 | public function __wakeup() |
||
125 | |||
126 | public function __construct() |
||
130 | |||
131 | /** |
||
132 | * @return int |
||
133 | */ |
||
134 | public function getId() |
||
138 | |||
139 | /** |
||
140 | * @return string |
||
141 | */ |
||
142 | public function getCartKey() |
||
146 | |||
147 | /** |
||
148 | * @param string $cartKey |
||
149 | */ |
||
150 | public function setCartKey(string $cartKey) |
||
154 | |||
155 | /** |
||
156 | * @return bool |
||
157 | * |
||
158 | * @deprecated 使用しないので削除予定 |
||
159 | */ |
||
160 | public function getLock() |
||
164 | |||
165 | /** |
||
166 | * @param bool $lock |
||
167 | * |
||
168 | * @return \Eccube\Entity\Cart |
||
169 | * |
||
170 | * @deprecated 使用しないので削除予定 |
||
171 | */ |
||
172 | public function setLock($lock) |
||
178 | |||
179 | /** |
||
180 | * @return string|null |
||
181 | */ |
||
182 | public function getPreOrderId() |
||
186 | |||
187 | /** |
||
188 | * @param integer $pre_order_id |
||
189 | * |
||
190 | * @return \Eccube\Entity\Cart |
||
191 | */ |
||
192 | public function setPreOrderId($pre_order_id) |
||
198 | |||
199 | /** |
||
200 | * @param CartItem $CartItem |
||
201 | * |
||
202 | * @return \Eccube\Entity\Cart |
||
203 | */ |
||
204 | public function addCartItem(CartItem $CartItem) |
||
210 | |||
211 | /** |
||
212 | * @return \Eccube\Entity\Cart |
||
213 | */ |
||
214 | public function clearCartItems() |
||
220 | |||
221 | /** |
||
222 | * @return ArrayCollection|CartItem[] |
||
223 | */ |
||
224 | public function getCartItems() |
||
228 | |||
229 | /** |
||
230 | * Alias of getCartItems() |
||
231 | */ |
||
232 | public function getItems() |
||
236 | |||
237 | /** |
||
238 | * @param CartItem[] $CartItems |
||
239 | * |
||
240 | * @return \Eccube\Entity\Cart |
||
241 | */ |
||
242 | public function setCartItems($CartItems) |
||
248 | |||
249 | /** |
||
250 | * Set total. |
||
251 | * |
||
252 | * @param integer $total_price |
||
253 | * |
||
254 | * @return Cart |
||
255 | */ |
||
256 | public function setTotalPrice($total_price) |
||
262 | |||
263 | /** |
||
264 | * @return string |
||
265 | */ |
||
266 | public function getTotalPrice() |
||
270 | |||
271 | /** |
||
272 | * Alias of setTotalPrice. |
||
273 | */ |
||
274 | public function setTotal($total) |
||
278 | |||
279 | /** |
||
280 | * Alias of getTotalPrice |
||
281 | */ |
||
282 | public function getTotal() |
||
286 | |||
287 | /** |
||
288 | * @return integer |
||
289 | */ |
||
290 | public function getTotalQuantity() |
||
299 | |||
300 | /** |
||
301 | * @param ItemInterface $item |
||
302 | */ |
||
303 | public function addItem(ItemInterface $item) |
||
307 | |||
308 | /** |
||
309 | * @param ItemInterface $item |
||
310 | */ |
||
311 | public function removeItem(ItemInterface $item) |
||
315 | |||
316 | /** |
||
317 | * 個数の合計を返します。 |
||
318 | * |
||
319 | * @return integer |
||
320 | */ |
||
321 | public function getQuantity() |
||
325 | |||
326 | /** |
||
327 | * {@inheritdoc} |
||
328 | */ |
||
329 | public function setDeliveryFeeTotal($total) |
||
335 | |||
336 | /** |
||
337 | * {@inheritdoc} |
||
338 | */ |
||
339 | public function getDeliveryFeeTotal() |
||
343 | |||
344 | /** |
||
345 | * @return Customer |
||
346 | */ |
||
347 | public function getCustomer(): Customer |
||
351 | |||
352 | /** |
||
353 | * @param Customer $Customer |
||
354 | */ |
||
355 | public function setCustomer(Customer $Customer = null) |
||
359 | |||
360 | /** |
||
361 | * Set sortNo. |
||
362 | * |
||
363 | * @param int|null $sortNo |
||
364 | * |
||
365 | * @return Cart |
||
366 | */ |
||
367 | public function setSortNo($sortNo = null) |
||
373 | |||
374 | /** |
||
375 | * Get sortNo. |
||
376 | * |
||
377 | * @return int|null |
||
378 | */ |
||
379 | public function getSortNo() |
||
383 | |||
384 | /** |
||
385 | * Set createDate. |
||
386 | * |
||
387 | * @param \DateTime $createDate |
||
388 | * |
||
389 | * @return Cart |
||
390 | */ |
||
391 | public function setCreateDate($createDate) |
||
397 | |||
398 | /** |
||
399 | * Get createDate. |
||
400 | * |
||
401 | * @return \DateTime |
||
402 | */ |
||
403 | public function getCreateDate() |
||
407 | |||
408 | /** |
||
409 | * Set updateDate. |
||
410 | * |
||
411 | * @param \DateTime $updateDate |
||
412 | * |
||
413 | * @return Cart |
||
414 | */ |
||
415 | public function setUpdateDate($updateDate) |
||
421 | |||
422 | /** |
||
423 | * Get updateDate. |
||
424 | * |
||
425 | * @return \DateTime |
||
426 | */ |
||
427 | public function getUpdateDate() |
||
431 | |||
432 | /** |
||
433 | * {@inheritdoc} |
||
434 | */ |
||
435 | public function setDiscount($total) |
||
439 | |||
440 | /** |
||
441 | * {@inheritdoc} |
||
442 | */ |
||
443 | public function setCharge($total) |
||
447 | |||
448 | /** |
||
449 | * {@inheritdoc} |
||
450 | */ |
||
451 | public function setTax($total) |
||
455 | } |
||
456 | } |
||
457 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..