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