Complex classes like Order often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use Order, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
39 | class Order extends \Eccube\Entity\AbstractEntity implements PurchaseInterface, ItemHolderInterface |
||
40 | { |
||
41 | use NameTrait, PointTrait; |
||
42 | |||
43 | /** |
||
44 | * 複数配送かどうかの判定を行う. |
||
45 | * |
||
46 | * @return boolean |
||
47 | */ |
||
48 | public function isMultiple() |
||
65 | |||
66 | /** |
||
67 | * 対象となるお届け先情報を取得 |
||
68 | * |
||
69 | * @param integer $shippingId |
||
70 | * |
||
71 | * @return \Eccube\Entity\Shipping|null |
||
72 | */ |
||
73 | public function findShipping($shippingId) |
||
83 | |||
84 | /** |
||
85 | * この注文の保持する販売種別を取得します. |
||
86 | * |
||
87 | * @return \Eccube\Entity\Master\SaleType[] 一意な販売種別の配列 |
||
88 | */ |
||
89 | public function getSaleTypes() |
||
102 | |||
103 | /** |
||
104 | * 同じ規格の商品の個数をまとめた受注明細を取得 |
||
105 | * |
||
106 | * @return OrderItem[] |
||
107 | */ |
||
108 | public function getMergedProductOrderItems() |
||
138 | |||
139 | /** |
||
140 | * 合計金額を計算 |
||
141 | * |
||
142 | * @return string |
||
143 | * |
||
144 | * @deprecated |
||
145 | */ |
||
146 | public function getTotalPrice() |
||
153 | |||
154 | /** |
||
155 | * @var integer |
||
156 | * |
||
157 | * @ORM\Column(name="id", type="integer", options={"unsigned":true}) |
||
158 | * @ORM\Id |
||
159 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
160 | */ |
||
161 | private $id; |
||
162 | |||
163 | /** |
||
164 | * @var string|null |
||
165 | * |
||
166 | * @ORM\Column(name="pre_order_id", type="string", length=255, nullable=true) |
||
167 | */ |
||
168 | private $pre_order_id; |
||
169 | |||
170 | /** |
||
171 | * @var string|null |
||
172 | * |
||
173 | * @ORM\Column(name="order_no", type="string", length=255, nullable=true) |
||
174 | */ |
||
175 | private $order_no; |
||
176 | |||
177 | /** |
||
178 | * @var string|null |
||
179 | * |
||
180 | * @ORM\Column(name="message", type="string", length=4000, nullable=true) |
||
181 | */ |
||
182 | private $message; |
||
183 | |||
184 | /** |
||
185 | * @var string|null |
||
186 | * |
||
187 | * @ORM\Column(name="name01", type="string", length=255, nullable=true) |
||
188 | */ |
||
189 | private $name01; |
||
190 | |||
191 | /** |
||
192 | * @var string|null |
||
193 | * |
||
194 | * @ORM\Column(name="name02", type="string", length=255, nullable=true) |
||
195 | */ |
||
196 | private $name02; |
||
197 | |||
198 | /** |
||
199 | * @var string|null |
||
200 | * |
||
201 | * @ORM\Column(name="kana01", type="string", length=255, nullable=true) |
||
202 | */ |
||
203 | private $kana01; |
||
204 | |||
205 | /** |
||
206 | * @var string|null |
||
207 | * |
||
208 | * @ORM\Column(name="kana02", type="string", length=255, nullable=true) |
||
209 | */ |
||
210 | private $kana02; |
||
211 | |||
212 | /** |
||
213 | * @var string|null |
||
214 | * |
||
215 | * @ORM\Column(name="company_name", type="string", length=255, nullable=true) |
||
216 | */ |
||
217 | private $company_name; |
||
218 | |||
219 | /** |
||
220 | * @var string|null |
||
221 | * |
||
222 | * @ORM\Column(name="email", type="string", length=255, nullable=true) |
||
223 | */ |
||
224 | private $email; |
||
225 | |||
226 | /** |
||
227 | * @var string|null |
||
228 | * |
||
229 | * @ORM\Column(name="phone_number", type="string", length=14, nullable=true) |
||
230 | */ |
||
231 | private $phone_number; |
||
232 | |||
233 | /** |
||
234 | * @var string|null |
||
235 | * |
||
236 | * @ORM\Column(name="postal_code", type="string", length=8, nullable=true) |
||
237 | */ |
||
238 | private $postal_code; |
||
239 | |||
240 | /** |
||
241 | * @var string|null |
||
242 | * |
||
243 | * @ORM\Column(name="addr01", type="string", length=255, nullable=true) |
||
244 | */ |
||
245 | private $addr01; |
||
246 | |||
247 | /** |
||
248 | * @var string|null |
||
249 | * |
||
250 | * @ORM\Column(name="addr02", type="string", length=255, nullable=true) |
||
251 | */ |
||
252 | private $addr02; |
||
253 | |||
254 | /** |
||
255 | * @var \DateTime|null |
||
256 | * |
||
257 | * @ORM\Column(name="birth", type="datetimetz", nullable=true) |
||
258 | */ |
||
259 | private $birth; |
||
260 | |||
261 | /** |
||
262 | * @var string |
||
263 | * |
||
264 | * @ORM\Column(name="subtotal", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
265 | */ |
||
266 | private $subtotal = 0; |
||
267 | |||
268 | /** |
||
269 | * @var string |
||
270 | * |
||
271 | * @ORM\Column(name="discount", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
272 | */ |
||
273 | private $discount = 0; |
||
274 | |||
275 | /** |
||
276 | * @var string |
||
277 | * |
||
278 | * @ORM\Column(name="delivery_fee_total", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
279 | */ |
||
280 | private $delivery_fee_total = 0; |
||
281 | |||
282 | /** |
||
283 | * @var string |
||
284 | * |
||
285 | * @ORM\Column(name="charge", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
286 | */ |
||
287 | private $charge = 0; |
||
288 | |||
289 | /** |
||
290 | * @var string |
||
291 | * |
||
292 | * @ORM\Column(name="tax", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
293 | */ |
||
294 | private $tax = 0; |
||
295 | |||
296 | /** |
||
297 | * @var string |
||
298 | * |
||
299 | * @ORM\Column(name="total", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
300 | */ |
||
301 | private $total = 0; |
||
302 | |||
303 | /** |
||
304 | * @var string |
||
305 | * |
||
306 | * @ORM\Column(name="payment_total", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
307 | */ |
||
308 | private $payment_total = 0; |
||
309 | |||
310 | /** |
||
311 | * @var string|null |
||
312 | * |
||
313 | * @ORM\Column(name="payment_method", type="string", length=255, nullable=true) |
||
314 | */ |
||
315 | private $payment_method; |
||
316 | |||
317 | /** |
||
318 | * @var string|null |
||
319 | * |
||
320 | * @ORM\Column(name="note", type="string", length=4000, nullable=true) |
||
321 | */ |
||
322 | private $note; |
||
323 | |||
324 | /** |
||
325 | * @var \DateTime |
||
326 | * |
||
327 | * @ORM\Column(name="create_date", type="datetimetz") |
||
328 | */ |
||
329 | private $create_date; |
||
330 | |||
331 | /** |
||
332 | * @var \DateTime |
||
333 | * |
||
334 | * @ORM\Column(name="update_date", type="datetimetz") |
||
335 | */ |
||
336 | private $update_date; |
||
337 | |||
338 | /** |
||
339 | * @var \DateTime|null |
||
340 | * |
||
341 | * @ORM\Column(name="order_date", type="datetimetz", nullable=true) |
||
342 | */ |
||
343 | private $order_date; |
||
344 | |||
345 | /** |
||
346 | * @var \DateTime|null |
||
347 | * |
||
348 | * @ORM\Column(name="payment_date", type="datetimetz", nullable=true) |
||
349 | */ |
||
350 | private $payment_date; |
||
351 | |||
352 | /** |
||
353 | * @var string|null |
||
354 | * |
||
355 | * @ORM\Column(name="currency_code", type="string", nullable=true) |
||
356 | */ |
||
357 | private $currency_code; |
||
358 | |||
359 | /** |
||
360 | * 注文完了画面に表示するメッセージ |
||
361 | * |
||
362 | * プラグインから注文完了時にメッセージを表示したい場合, このフィールドにセットすることで, 注文完了画面で表示されます。 |
||
363 | * 複数のプラグインから利用されるため, appendCompleteMesssage()で追加してください. |
||
364 | * 表示する際にHTMLは利用可能です。 |
||
365 | * |
||
366 | * @var string|null |
||
367 | * |
||
368 | * @ORM\Column(name="complete_message", type="text", nullable=true) |
||
369 | */ |
||
370 | private $complete_message; |
||
371 | |||
372 | /** |
||
373 | * 注文完了メールに表示するメッセージ |
||
374 | * |
||
375 | * プラグインから注文完了メールにメッセージを表示したい場合, このフィールドにセットすることで, 注文完了メールで表示されます。 |
||
376 | * 複数のプラグインから利用されるため, appendCompleteMailMesssage()で追加してください. |
||
377 | * |
||
378 | * @var string|null |
||
379 | * |
||
380 | * @ORM\Column(name="complete_mail_message", type="text", nullable=true) |
||
381 | */ |
||
382 | private $complete_mail_message; |
||
383 | |||
384 | /** |
||
385 | * @var \Doctrine\Common\Collections\Collection|OrderItem[] |
||
386 | * |
||
387 | * @ORM\OneToMany(targetEntity="Eccube\Entity\OrderItem", mappedBy="Order", cascade={"persist","remove"}) |
||
388 | */ |
||
389 | private $OrderItems; |
||
390 | |||
391 | /** |
||
392 | * @var \Doctrine\Common\Collections\Collection|Shipping[] |
||
393 | * |
||
394 | * @ORM\OneToMany(targetEntity="Eccube\Entity\Shipping", mappedBy="Order", cascade={"persist","remove"}) |
||
395 | */ |
||
396 | private $Shippings; |
||
397 | |||
398 | /** |
||
399 | * @var \Doctrine\Common\Collections\Collection |
||
400 | * |
||
401 | * @ORM\OneToMany(targetEntity="Eccube\Entity\MailHistory", mappedBy="Order", cascade={"remove"}) |
||
402 | * @ORM\OrderBy({ |
||
403 | * "send_date"="DESC" |
||
404 | * }) |
||
405 | */ |
||
406 | private $MailHistories; |
||
407 | |||
408 | /** |
||
409 | * @var \Eccube\Entity\Customer |
||
410 | * |
||
411 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Customer", inversedBy="Orders") |
||
412 | * @ORM\JoinColumns({ |
||
413 | * @ORM\JoinColumn(name="customer_id", referencedColumnName="id") |
||
414 | * }) |
||
415 | */ |
||
416 | private $Customer; |
||
417 | |||
418 | /** |
||
419 | * @var \Eccube\Entity\Master\Country |
||
420 | * |
||
421 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Country") |
||
422 | * @ORM\JoinColumns({ |
||
423 | * @ORM\JoinColumn(name="country_id", referencedColumnName="id") |
||
424 | * }) |
||
425 | */ |
||
426 | private $Country; |
||
427 | |||
428 | /** |
||
429 | * @var \Eccube\Entity\Master\Pref |
||
430 | * |
||
431 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Pref") |
||
432 | * @ORM\JoinColumns({ |
||
433 | * @ORM\JoinColumn(name="pref_id", referencedColumnName="id") |
||
434 | * }) |
||
435 | */ |
||
436 | private $Pref; |
||
437 | |||
438 | /** |
||
439 | * @var \Eccube\Entity\Master\Sex |
||
440 | * |
||
441 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Sex") |
||
442 | * @ORM\JoinColumns({ |
||
443 | * @ORM\JoinColumn(name="sex_id", referencedColumnName="id") |
||
444 | * }) |
||
445 | */ |
||
446 | private $Sex; |
||
447 | |||
448 | /** |
||
449 | * @var \Eccube\Entity\Master\Job |
||
450 | * |
||
451 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Job") |
||
452 | * @ORM\JoinColumns({ |
||
453 | * @ORM\JoinColumn(name="job_id", referencedColumnName="id") |
||
454 | * }) |
||
455 | */ |
||
456 | private $Job; |
||
457 | |||
458 | /** |
||
459 | * @var \Eccube\Entity\Payment |
||
460 | * |
||
461 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Payment") |
||
462 | * @ORM\JoinColumns({ |
||
463 | * @ORM\JoinColumn(name="payment_id", referencedColumnName="id") |
||
464 | * }) |
||
465 | */ |
||
466 | private $Payment; |
||
467 | |||
468 | /** |
||
469 | * @var \Eccube\Entity\Master\DeviceType |
||
470 | * |
||
471 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\DeviceType") |
||
472 | * @ORM\JoinColumns({ |
||
473 | * @ORM\JoinColumn(name="device_type_id", referencedColumnName="id") |
||
474 | * }) |
||
475 | */ |
||
476 | private $DeviceType; |
||
477 | |||
478 | /** |
||
479 | * @var \Eccube\Entity\Master\CustomerOrderStatus |
||
480 | * |
||
481 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\CustomerOrderStatus") |
||
482 | * @ORM\JoinColumns({ |
||
483 | * @ORM\JoinColumn(name="order_status_id", referencedColumnName="id") |
||
484 | * }) |
||
485 | */ |
||
486 | private $CustomerOrderStatus; |
||
487 | |||
488 | /** |
||
489 | * @var \Eccube\Entity\Master\OrderStatus |
||
490 | * |
||
491 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\OrderStatus") |
||
492 | * @ORM\JoinColumns({ |
||
493 | * @ORM\JoinColumn(name="order_status_id", referencedColumnName="id") |
||
494 | * }) |
||
495 | */ |
||
496 | private $OrderStatus; |
||
497 | |||
498 | /** |
||
499 | * Constructor |
||
500 | */ |
||
501 | public function __construct(\Eccube\Entity\Master\OrderStatus $orderStatus = null) |
||
517 | |||
518 | /** |
||
519 | * Clone |
||
520 | */ |
||
521 | public function __clone() |
||
529 | |||
530 | /** |
||
531 | * Get id. |
||
532 | * |
||
533 | * @return int |
||
534 | */ |
||
535 | public function getId() |
||
539 | |||
540 | /** |
||
541 | * Set preOrderId. |
||
542 | * |
||
543 | * @param string|null $preOrderId |
||
544 | * |
||
545 | * @return Order |
||
546 | */ |
||
547 | public function setPreOrderId($preOrderId = null) |
||
553 | |||
554 | /** |
||
555 | * Get preOrderId. |
||
556 | * |
||
557 | * @return string|null |
||
558 | */ |
||
559 | public function getPreOrderId() |
||
563 | |||
564 | /** |
||
565 | * Set orderNo |
||
566 | * |
||
567 | * @param string|null $orderNo |
||
568 | * |
||
569 | * @return Order |
||
570 | */ |
||
571 | public function setOrderNo($orderNo = null) |
||
577 | |||
578 | /** |
||
579 | * Get orderNo |
||
580 | * |
||
581 | * @return string|null |
||
582 | */ |
||
583 | public function getOrderNo() |
||
587 | |||
588 | /** |
||
589 | * Set message. |
||
590 | * |
||
591 | * @param string|null $message |
||
592 | * |
||
593 | * @return Order |
||
594 | */ |
||
595 | public function setMessage($message = null) |
||
601 | |||
602 | /** |
||
603 | * Get message. |
||
604 | * |
||
605 | * @return string|null |
||
606 | */ |
||
607 | public function getMessage() |
||
611 | |||
612 | /** |
||
613 | * Set name01. |
||
614 | * |
||
615 | * @param string|null $name01 |
||
616 | * |
||
617 | * @return Order |
||
618 | */ |
||
619 | public function setName01($name01 = null) |
||
625 | |||
626 | /** |
||
627 | * Get name01. |
||
628 | * |
||
629 | * @return string|null |
||
630 | */ |
||
631 | public function getName01() |
||
635 | |||
636 | /** |
||
637 | * Set name02. |
||
638 | * |
||
639 | * @param string|null $name02 |
||
640 | * |
||
641 | * @return Order |
||
642 | */ |
||
643 | public function setName02($name02 = null) |
||
649 | |||
650 | /** |
||
651 | * Get name02. |
||
652 | * |
||
653 | * @return string|null |
||
654 | */ |
||
655 | public function getName02() |
||
659 | |||
660 | /** |
||
661 | * Set kana01. |
||
662 | * |
||
663 | * @param string|null $kana01 |
||
664 | * |
||
665 | * @return Order |
||
666 | */ |
||
667 | public function setKana01($kana01 = null) |
||
673 | |||
674 | /** |
||
675 | * Get kana01. |
||
676 | * |
||
677 | * @return string|null |
||
678 | */ |
||
679 | public function getKana01() |
||
683 | |||
684 | /** |
||
685 | * Set kana02. |
||
686 | * |
||
687 | * @param string|null $kana02 |
||
688 | * |
||
689 | * @return Order |
||
690 | */ |
||
691 | public function setKana02($kana02 = null) |
||
697 | |||
698 | /** |
||
699 | * Get kana02. |
||
700 | * |
||
701 | * @return string|null |
||
702 | */ |
||
703 | public function getKana02() |
||
707 | |||
708 | /** |
||
709 | * Set companyName. |
||
710 | * |
||
711 | * @param string|null $companyName |
||
712 | * |
||
713 | * @return Order |
||
714 | */ |
||
715 | public function setCompanyName($companyName = null) |
||
721 | |||
722 | /** |
||
723 | * Get companyName. |
||
724 | * |
||
725 | * @return string|null |
||
726 | */ |
||
727 | public function getCompanyName() |
||
731 | |||
732 | /** |
||
733 | * Set email. |
||
734 | * |
||
735 | * @param string|null $email |
||
736 | * |
||
737 | * @return Order |
||
738 | */ |
||
739 | public function setEmail($email = null) |
||
745 | |||
746 | /** |
||
747 | * Get email. |
||
748 | * |
||
749 | * @return string|null |
||
750 | */ |
||
751 | public function getEmail() |
||
755 | |||
756 | /** |
||
757 | * Set phone_number. |
||
758 | * |
||
759 | * @param string|null $phone_number |
||
760 | * |
||
761 | * @return Order |
||
762 | */ |
||
763 | public function setPhoneNumber($phone_number = null) |
||
769 | |||
770 | /** |
||
771 | * Get phone_number. |
||
772 | * |
||
773 | * @return string|null |
||
774 | */ |
||
775 | public function getPhoneNumber() |
||
779 | |||
780 | /** |
||
781 | * Set postal_code. |
||
782 | * |
||
783 | * @param string|null $postal_code |
||
784 | * |
||
785 | * @return Order |
||
786 | */ |
||
787 | public function setPostalCode($postal_code = null) |
||
793 | |||
794 | /** |
||
795 | * Get postal_code. |
||
796 | * |
||
797 | * @return string|null |
||
798 | */ |
||
799 | public function getPostalCode() |
||
803 | |||
804 | /** |
||
805 | * Set addr01. |
||
806 | * |
||
807 | * @param string|null $addr01 |
||
808 | * |
||
809 | * @return Order |
||
810 | */ |
||
811 | public function setAddr01($addr01 = null) |
||
817 | |||
818 | /** |
||
819 | * Get addr01. |
||
820 | * |
||
821 | * @return string|null |
||
822 | */ |
||
823 | public function getAddr01() |
||
827 | |||
828 | /** |
||
829 | * Set addr02. |
||
830 | * |
||
831 | * @param string|null $addr02 |
||
832 | * |
||
833 | * @return Order |
||
834 | */ |
||
835 | public function setAddr02($addr02 = null) |
||
841 | |||
842 | /** |
||
843 | * Get addr02. |
||
844 | * |
||
845 | * @return string|null |
||
846 | */ |
||
847 | public function getAddr02() |
||
851 | |||
852 | /** |
||
853 | * Set birth. |
||
854 | * |
||
855 | * @param \DateTime|null $birth |
||
856 | * |
||
857 | * @return Order |
||
858 | */ |
||
859 | public function setBirth($birth = null) |
||
865 | |||
866 | /** |
||
867 | * Get birth. |
||
868 | * |
||
869 | * @return \DateTime|null |
||
870 | */ |
||
871 | public function getBirth() |
||
875 | |||
876 | /** |
||
877 | * Set subtotal. |
||
878 | * |
||
879 | * @param string $subtotal |
||
880 | * |
||
881 | * @return Order |
||
882 | */ |
||
883 | public function setSubtotal($subtotal) |
||
889 | |||
890 | /** |
||
891 | * Get subtotal. |
||
892 | * |
||
893 | * @return string |
||
894 | */ |
||
895 | public function getSubtotal() |
||
899 | |||
900 | /** |
||
901 | * Set discount. |
||
902 | * |
||
903 | * @param string $discount |
||
904 | * |
||
905 | * @return Order |
||
906 | */ |
||
907 | public function setDiscount($discount) |
||
913 | |||
914 | /** |
||
915 | * Get discount. |
||
916 | * |
||
917 | * @return string |
||
918 | */ |
||
919 | public function getDiscount() |
||
923 | |||
924 | /** |
||
925 | * Set deliveryFeeTotal. |
||
926 | * |
||
927 | * @param string $deliveryFeeTotal |
||
928 | * |
||
929 | * @return Order |
||
930 | */ |
||
931 | public function setDeliveryFeeTotal($deliveryFeeTotal) |
||
937 | |||
938 | /** |
||
939 | * Get deliveryFeeTotal. |
||
940 | * |
||
941 | * @return string |
||
942 | */ |
||
943 | public function getDeliveryFeeTotal() |
||
947 | |||
948 | /** |
||
949 | * Set charge. |
||
950 | * |
||
951 | * @param string $charge |
||
952 | * |
||
953 | * @return Order |
||
954 | */ |
||
955 | public function setCharge($charge) |
||
961 | |||
962 | /** |
||
963 | * Get charge. |
||
964 | * |
||
965 | * @return string |
||
966 | */ |
||
967 | public function getCharge() |
||
971 | |||
972 | /** |
||
973 | * Set tax. |
||
974 | * |
||
975 | * @param string $tax |
||
976 | * |
||
977 | * @return Order |
||
978 | */ |
||
979 | public function setTax($tax) |
||
985 | |||
986 | /** |
||
987 | * Get tax. |
||
988 | * |
||
989 | * @return string |
||
990 | */ |
||
991 | public function getTax() |
||
995 | |||
996 | /** |
||
997 | * Set total. |
||
998 | * |
||
999 | * @param string $total |
||
1000 | * |
||
1001 | * @return Order |
||
1002 | */ |
||
1003 | public function setTotal($total) |
||
1009 | |||
1010 | /** |
||
1011 | * Get total. |
||
1012 | * |
||
1013 | * @return string |
||
1014 | */ |
||
1015 | public function getTotal() |
||
1019 | |||
1020 | /** |
||
1021 | * Set paymentTotal. |
||
1022 | * |
||
1023 | * @param string $paymentTotal |
||
1024 | * |
||
1025 | * @return Order |
||
1026 | */ |
||
1027 | public function setPaymentTotal($paymentTotal) |
||
1033 | |||
1034 | /** |
||
1035 | * Get paymentTotal. |
||
1036 | * |
||
1037 | * @return string |
||
1038 | */ |
||
1039 | public function getPaymentTotal() |
||
1043 | |||
1044 | /** |
||
1045 | * Set paymentMethod. |
||
1046 | * |
||
1047 | * @param string|null $paymentMethod |
||
1048 | * |
||
1049 | * @return Order |
||
1050 | */ |
||
1051 | public function setPaymentMethod($paymentMethod = null) |
||
1057 | |||
1058 | /** |
||
1059 | * Get paymentMethod. |
||
1060 | * |
||
1061 | * @return string|null |
||
1062 | */ |
||
1063 | public function getPaymentMethod() |
||
1067 | |||
1068 | /** |
||
1069 | * Set note. |
||
1070 | * |
||
1071 | * @param string|null $note |
||
1072 | * |
||
1073 | * @return Order |
||
1074 | */ |
||
1075 | public function setNote($note = null) |
||
1081 | |||
1082 | /** |
||
1083 | * Get note. |
||
1084 | * |
||
1085 | * @return string|null |
||
1086 | */ |
||
1087 | public function getNote() |
||
1091 | |||
1092 | /** |
||
1093 | * Set createDate. |
||
1094 | * |
||
1095 | * @param \DateTime $createDate |
||
1096 | * |
||
1097 | * @return Order |
||
1098 | */ |
||
1099 | public function setCreateDate($createDate) |
||
1105 | |||
1106 | /** |
||
1107 | * Get createDate. |
||
1108 | * |
||
1109 | * @return \DateTime |
||
1110 | */ |
||
1111 | public function getCreateDate() |
||
1115 | |||
1116 | /** |
||
1117 | * Set updateDate. |
||
1118 | * |
||
1119 | * @param \DateTime $updateDate |
||
1120 | * |
||
1121 | * @return Order |
||
1122 | */ |
||
1123 | public function setUpdateDate($updateDate) |
||
1129 | |||
1130 | /** |
||
1131 | * Get updateDate. |
||
1132 | * |
||
1133 | * @return \DateTime |
||
1134 | */ |
||
1135 | public function getUpdateDate() |
||
1139 | |||
1140 | /** |
||
1141 | * Set orderDate. |
||
1142 | * |
||
1143 | * @param \DateTime|null $orderDate |
||
1144 | * |
||
1145 | * @return Order |
||
1146 | */ |
||
1147 | public function setOrderDate($orderDate = null) |
||
1153 | |||
1154 | /** |
||
1155 | * Get orderDate. |
||
1156 | * |
||
1157 | * @return \DateTime|null |
||
1158 | */ |
||
1159 | public function getOrderDate() |
||
1163 | |||
1164 | /** |
||
1165 | * Set paymentDate. |
||
1166 | * |
||
1167 | * @param \DateTime|null $paymentDate |
||
1168 | * |
||
1169 | * @return Order |
||
1170 | */ |
||
1171 | public function setPaymentDate($paymentDate = null) |
||
1177 | |||
1178 | /** |
||
1179 | * Get paymentDate. |
||
1180 | * |
||
1181 | * @return \DateTime|null |
||
1182 | */ |
||
1183 | public function getPaymentDate() |
||
1187 | |||
1188 | /** |
||
1189 | * Get currencyCode. |
||
1190 | * |
||
1191 | * @return string |
||
1192 | */ |
||
1193 | public function getCurrencyCode() |
||
1197 | |||
1198 | /** |
||
1199 | * Set currencyCode. |
||
1200 | * |
||
1201 | * @param string|null $currencyCode |
||
1202 | * |
||
1203 | * @return $this |
||
1204 | */ |
||
1205 | public function setCurrencyCode($currencyCode = null) |
||
1211 | |||
1212 | /** |
||
1213 | * @return null|string |
||
1214 | */ |
||
1215 | public function getCompleteMessage() |
||
1219 | |||
1220 | /** |
||
1221 | * @param null|string $complete_message |
||
1222 | * |
||
1223 | * @return $this |
||
1224 | */ |
||
1225 | public function setCompleteMessage($complete_message = null) |
||
1231 | |||
1232 | /** |
||
1233 | * @param null|string $complete_message |
||
1234 | * |
||
1235 | * @return $this |
||
1236 | */ |
||
1237 | public function appendCompleteMessage($complete_message = null) |
||
1243 | |||
1244 | /** |
||
1245 | * @return null|string |
||
1246 | */ |
||
1247 | public function getCompleteMailMessage() |
||
1251 | |||
1252 | /** |
||
1253 | * @param null|string $complete_mail_message |
||
1254 | * |
||
1255 | * @return |
||
1256 | */ |
||
1257 | public function setCompleteMailMessage($complete_mail_message = null) |
||
1263 | |||
1264 | /** |
||
1265 | * @param null|string $complete_mail_message |
||
1266 | * |
||
1267 | * @return |
||
1268 | */ |
||
1269 | public function appendCompleteMailMessage($complete_mail_message = null) |
||
1275 | |||
1276 | /** |
||
1277 | * 商品の受注明細を取得 |
||
1278 | * |
||
1279 | * @return OrderItem[] |
||
1280 | */ |
||
1281 | public function getProductOrderItems() |
||
1287 | |||
1288 | /** |
||
1289 | * Add orderItem. |
||
1290 | * |
||
1291 | * @param \Eccube\Entity\OrderItem $OrderItem |
||
1292 | * |
||
1293 | * @return Order |
||
1294 | */ |
||
1295 | public function addOrderItem(\Eccube\Entity\OrderItem $OrderItem) |
||
1301 | |||
1302 | /** |
||
1303 | * Remove orderItem. |
||
1304 | * |
||
1305 | * @param \Eccube\Entity\OrderItem $OrderItem |
||
1306 | * |
||
1307 | * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. |
||
1308 | */ |
||
1309 | public function removeOrderItem(\Eccube\Entity\OrderItem $OrderItem) |
||
1313 | |||
1314 | /** |
||
1315 | * Get orderItems. |
||
1316 | * |
||
1317 | * @return \Doctrine\Common\Collections\Collection|OrderItem[] |
||
1318 | */ |
||
1319 | public function getOrderItems() |
||
1323 | |||
1324 | /** |
||
1325 | * Sorted to getOrderItems() |
||
1326 | * |
||
1327 | * @return ItemCollection |
||
1328 | */ |
||
1329 | public function getItems() |
||
1333 | |||
1334 | /** |
||
1335 | * Add shipping. |
||
1336 | * |
||
1337 | * @param \Eccube\Entity\Shipping $Shipping |
||
1338 | * |
||
1339 | * @return Order |
||
1340 | */ |
||
1341 | public function addShipping(\Eccube\Entity\Shipping $Shipping) |
||
1347 | |||
1348 | /** |
||
1349 | * Remove shipping. |
||
1350 | * |
||
1351 | * @param \Eccube\Entity\Shipping $Shipping |
||
1352 | * |
||
1353 | * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. |
||
1354 | */ |
||
1355 | public function removeShipping(\Eccube\Entity\Shipping $Shipping) |
||
1359 | |||
1360 | /** |
||
1361 | * Get shippings. |
||
1362 | * |
||
1363 | * @return \Doctrine\Common\Collections\Collection|\Eccube\Entity\Shipping[] |
||
1364 | */ |
||
1365 | public function getShippings() |
||
1372 | |||
1373 | /** |
||
1374 | * Add mailHistory. |
||
1375 | * |
||
1376 | * @param \Eccube\Entity\MailHistory $mailHistory |
||
1377 | * |
||
1378 | * @return Order |
||
1379 | */ |
||
1380 | public function addMailHistory(\Eccube\Entity\MailHistory $mailHistory) |
||
1386 | |||
1387 | /** |
||
1388 | * Remove mailHistory. |
||
1389 | * |
||
1390 | * @param \Eccube\Entity\MailHistory $mailHistory |
||
1391 | * |
||
1392 | * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. |
||
1393 | */ |
||
1394 | public function removeMailHistory(\Eccube\Entity\MailHistory $mailHistory) |
||
1398 | |||
1399 | /** |
||
1400 | * Get mailHistories. |
||
1401 | * |
||
1402 | * @return \Doctrine\Common\Collections\Collection |
||
1403 | */ |
||
1404 | public function getMailHistories() |
||
1408 | |||
1409 | /** |
||
1410 | * Set customer. |
||
1411 | * |
||
1412 | * @param \Eccube\Entity\Customer|null $customer |
||
1413 | * |
||
1414 | * @return Order |
||
1415 | */ |
||
1416 | public function setCustomer(\Eccube\Entity\Customer $customer = null) |
||
1422 | |||
1423 | /** |
||
1424 | * Get customer. |
||
1425 | * |
||
1426 | * @return \Eccube\Entity\Customer|null |
||
1427 | */ |
||
1428 | public function getCustomer() |
||
1432 | |||
1433 | /** |
||
1434 | * Set country. |
||
1435 | * |
||
1436 | * @param \Eccube\Entity\Master\Country|null $country |
||
1437 | * |
||
1438 | * @return Order |
||
1439 | */ |
||
1440 | public function setCountry(\Eccube\Entity\Master\Country $country = null) |
||
1446 | |||
1447 | /** |
||
1448 | * Get country. |
||
1449 | * |
||
1450 | * @return \Eccube\Entity\Master\Country|null |
||
1451 | */ |
||
1452 | public function getCountry() |
||
1456 | |||
1457 | /** |
||
1458 | * Set pref. |
||
1459 | * |
||
1460 | * @param \Eccube\Entity\Master\Pref|null $pref |
||
1461 | * |
||
1462 | * @return Order |
||
1463 | */ |
||
1464 | public function setPref(\Eccube\Entity\Master\Pref $pref = null) |
||
1470 | |||
1471 | /** |
||
1472 | * Get pref. |
||
1473 | * |
||
1474 | * @return \Eccube\Entity\Master\Pref|null |
||
1475 | */ |
||
1476 | public function getPref() |
||
1480 | |||
1481 | /** |
||
1482 | * Set sex. |
||
1483 | * |
||
1484 | * @param \Eccube\Entity\Master\Sex|null $sex |
||
1485 | * |
||
1486 | * @return Order |
||
1487 | */ |
||
1488 | public function setSex(\Eccube\Entity\Master\Sex $sex = null) |
||
1494 | |||
1495 | /** |
||
1496 | * Get sex. |
||
1497 | * |
||
1498 | * @return \Eccube\Entity\Master\Sex|null |
||
1499 | */ |
||
1500 | public function getSex() |
||
1504 | |||
1505 | /** |
||
1506 | * Set job. |
||
1507 | * |
||
1508 | * @param \Eccube\Entity\Master\Job|null $job |
||
1509 | * |
||
1510 | * @return Order |
||
1511 | */ |
||
1512 | public function setJob(\Eccube\Entity\Master\Job $job = null) |
||
1518 | |||
1519 | /** |
||
1520 | * Get job. |
||
1521 | * |
||
1522 | * @return \Eccube\Entity\Master\Job|null |
||
1523 | */ |
||
1524 | public function getJob() |
||
1528 | |||
1529 | /** |
||
1530 | * Set payment. |
||
1531 | * |
||
1532 | * @param \Eccube\Entity\Payment|null $payment |
||
1533 | * |
||
1534 | * @return Order |
||
1535 | */ |
||
1536 | public function setPayment(\Eccube\Entity\Payment $payment = null) |
||
1542 | |||
1543 | /** |
||
1544 | * Get payment. |
||
1545 | * |
||
1546 | * @return \Eccube\Entity\Payment|null |
||
1547 | */ |
||
1548 | public function getPayment() |
||
1552 | |||
1553 | /** |
||
1554 | * Set deviceType. |
||
1555 | * |
||
1556 | * @param \Eccube\Entity\Master\DeviceType|null $deviceType |
||
1557 | * |
||
1558 | * @return Order |
||
1559 | */ |
||
1560 | public function setDeviceType(\Eccube\Entity\Master\DeviceType $deviceType = null) |
||
1566 | |||
1567 | /** |
||
1568 | * Get deviceType. |
||
1569 | * |
||
1570 | * @return \Eccube\Entity\Master\DeviceType|null |
||
1571 | */ |
||
1572 | public function getDeviceType() |
||
1576 | |||
1577 | /** |
||
1578 | * Set customerOrderStatus. |
||
1579 | * |
||
1580 | * @param \Eccube\Entity\Master\CustomerOrderStatus|null $customerOrderStatus |
||
1581 | * |
||
1582 | * @return Order |
||
1583 | */ |
||
1584 | public function setCustomerOrderStatus(\Eccube\Entity\Master\CustomerOrderStatus $customerOrderStatus = null) |
||
1590 | |||
1591 | /** |
||
1592 | * Get customerOrderStatus. |
||
1593 | * |
||
1594 | * @return \Eccube\Entity\Master\CustomerOrderStatus|null |
||
1595 | */ |
||
1596 | public function getCustomerOrderStatus() |
||
1600 | |||
1601 | /** |
||
1602 | * Set orderStatus. |
||
1603 | * |
||
1604 | * @param \Eccube\Entity\Master\OrderStatus|null $orderStatus |
||
1605 | * |
||
1606 | * @return Order |
||
1607 | */ |
||
1608 | public function setOrderStatus(\Eccube\Entity\Master\OrderStatus $orderStatus = null) |
||
1614 | |||
1615 | /** |
||
1616 | * Get orderStatus. |
||
1617 | * |
||
1618 | * @return \Eccube\Entity\Master\OrderStatus|null |
||
1619 | */ |
||
1620 | public function getOrderStatus() |
||
1624 | |||
1625 | /** |
||
1626 | * @param ItemInterface $item |
||
1627 | */ |
||
1628 | public function addItem(ItemInterface $item) |
||
1632 | |||
1633 | public function getQuantity() |
||
1642 | } |
||
1643 | } |
||
1644 |
If you suppress an error, we recommend checking for the error condition explicitly: