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 string |
||
106 | * |
||
107 | * @deprecated |
||
108 | */ |
||
109 | 1 | public function getTotalPrice() |
|
116 | |||
117 | /** |
||
118 | * @var integer |
||
119 | * |
||
120 | * @ORM\Column(name="id", type="integer", options={"unsigned":true}) |
||
121 | * @ORM\Id |
||
122 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
123 | */ |
||
124 | private $id; |
||
125 | |||
126 | /** |
||
127 | * @var string|null |
||
128 | * |
||
129 | * @ORM\Column(name="pre_order_id", type="string", length=255, nullable=true) |
||
130 | */ |
||
131 | private $pre_order_id; |
||
132 | |||
133 | /** |
||
134 | * @var string|null |
||
135 | * |
||
136 | * @ORM\Column(name="order_no", type="string", length=255, nullable=true) |
||
137 | */ |
||
138 | private $order_no; |
||
139 | |||
140 | /** |
||
141 | * @var string|null |
||
142 | * |
||
143 | * @ORM\Column(name="message", type="string", length=4000, nullable=true) |
||
144 | */ |
||
145 | private $message; |
||
146 | |||
147 | /** |
||
148 | * @var string|null |
||
149 | * |
||
150 | * @ORM\Column(name="name01", type="string", length=255, nullable=true) |
||
151 | */ |
||
152 | private $name01; |
||
153 | |||
154 | /** |
||
155 | * @var string|null |
||
156 | * |
||
157 | * @ORM\Column(name="name02", type="string", length=255, nullable=true) |
||
158 | */ |
||
159 | private $name02; |
||
160 | |||
161 | /** |
||
162 | * @var string|null |
||
163 | * |
||
164 | * @ORM\Column(name="kana01", type="string", length=255, nullable=true) |
||
165 | */ |
||
166 | private $kana01; |
||
167 | |||
168 | /** |
||
169 | * @var string|null |
||
170 | * |
||
171 | * @ORM\Column(name="kana02", type="string", length=255, nullable=true) |
||
172 | */ |
||
173 | private $kana02; |
||
174 | |||
175 | /** |
||
176 | * @var string|null |
||
177 | * |
||
178 | * @ORM\Column(name="company_name", type="string", length=255, nullable=true) |
||
179 | */ |
||
180 | private $company_name; |
||
181 | |||
182 | /** |
||
183 | * @var string|null |
||
184 | * |
||
185 | * @ORM\Column(name="email", type="string", length=255, nullable=true) |
||
186 | */ |
||
187 | private $email; |
||
188 | |||
189 | /** |
||
190 | * @var string|null |
||
191 | * |
||
192 | * @ORM\Column(name="phone_number", type="string", length=14, nullable=true) |
||
193 | */ |
||
194 | private $phone_number; |
||
195 | |||
196 | /** |
||
197 | * @var string|null |
||
198 | * |
||
199 | * @ORM\Column(name="postal_code", type="string", length=8, nullable=true) |
||
200 | */ |
||
201 | private $postal_code; |
||
202 | |||
203 | /** |
||
204 | * @var string|null |
||
205 | * |
||
206 | * @ORM\Column(name="addr01", type="string", length=255, nullable=true) |
||
207 | */ |
||
208 | private $addr01; |
||
209 | |||
210 | /** |
||
211 | * @var string|null |
||
212 | * |
||
213 | * @ORM\Column(name="addr02", type="string", length=255, nullable=true) |
||
214 | */ |
||
215 | private $addr02; |
||
216 | |||
217 | /** |
||
218 | * @var \DateTime|null |
||
219 | * |
||
220 | * @ORM\Column(name="birth", type="datetimetz", nullable=true) |
||
221 | */ |
||
222 | private $birth; |
||
223 | |||
224 | /** |
||
225 | * @var string |
||
226 | * |
||
227 | * @ORM\Column(name="subtotal", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
228 | */ |
||
229 | private $subtotal = 0; |
||
230 | |||
231 | /** |
||
232 | * @var string |
||
233 | * |
||
234 | * @ORM\Column(name="discount", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
235 | */ |
||
236 | private $discount = 0; |
||
237 | |||
238 | /** |
||
239 | * @var string |
||
240 | * |
||
241 | * @ORM\Column(name="delivery_fee_total", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
242 | */ |
||
243 | private $delivery_fee_total = 0; |
||
244 | |||
245 | /** |
||
246 | * @var string |
||
247 | * |
||
248 | * @ORM\Column(name="charge", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
249 | */ |
||
250 | private $charge = 0; |
||
251 | |||
252 | /** |
||
253 | * @var string |
||
254 | * |
||
255 | * @ORM\Column(name="tax", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
256 | */ |
||
257 | private $tax = 0; |
||
258 | |||
259 | /** |
||
260 | * @var string |
||
261 | * |
||
262 | * @ORM\Column(name="total", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
263 | */ |
||
264 | private $total = 0; |
||
265 | |||
266 | /** |
||
267 | * @var string |
||
268 | * |
||
269 | * @ORM\Column(name="payment_total", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
270 | */ |
||
271 | private $payment_total = 0; |
||
272 | |||
273 | /** |
||
274 | * @var string|null |
||
275 | * |
||
276 | * @ORM\Column(name="payment_method", type="string", length=255, nullable=true) |
||
277 | */ |
||
278 | private $payment_method; |
||
279 | |||
280 | /** |
||
281 | * @var string|null |
||
282 | * |
||
283 | * @ORM\Column(name="note", type="string", length=4000, nullable=true) |
||
284 | */ |
||
285 | private $note; |
||
286 | |||
287 | /** |
||
288 | * @var \DateTime |
||
289 | * |
||
290 | * @ORM\Column(name="create_date", type="datetimetz") |
||
291 | */ |
||
292 | private $create_date; |
||
293 | |||
294 | /** |
||
295 | * @var \DateTime |
||
296 | * |
||
297 | * @ORM\Column(name="update_date", type="datetimetz") |
||
298 | */ |
||
299 | private $update_date; |
||
300 | |||
301 | /** |
||
302 | * @var \DateTime|null |
||
303 | * |
||
304 | * @ORM\Column(name="order_date", type="datetimetz", nullable=true) |
||
305 | */ |
||
306 | private $order_date; |
||
307 | |||
308 | /** |
||
309 | * @var \DateTime|null |
||
310 | * |
||
311 | * @ORM\Column(name="payment_date", type="datetimetz", nullable=true) |
||
312 | */ |
||
313 | private $payment_date; |
||
314 | |||
315 | /** |
||
316 | * @var string|null |
||
317 | * |
||
318 | * @ORM\Column(name="currency_code", type="string", nullable=true) |
||
319 | */ |
||
320 | private $currency_code; |
||
321 | |||
322 | /** |
||
323 | * 注文完了画面に表示するメッセージ |
||
324 | * |
||
325 | * プラグインから注文完了時にメッセージを表示したい場合, このフィールドにセットすることで, 注文完了画面で表示されます。 |
||
326 | * 複数のプラグインから利用されるため, appendCompleteMesssage()で追加してください. |
||
327 | * 表示する際にHTMLは利用可能です。 |
||
328 | * |
||
329 | * @var string|null |
||
330 | * |
||
331 | * @ORM\Column(name="complete_message", type="text", nullable=true) |
||
332 | */ |
||
333 | private $complete_message; |
||
334 | |||
335 | /** |
||
336 | * 注文完了メールに表示するメッセージ |
||
337 | * |
||
338 | * プラグインから注文完了メールにメッセージを表示したい場合, このフィールドにセットすることで, 注文完了メールで表示されます。 |
||
339 | * 複数のプラグインから利用されるため, appendCompleteMailMesssage()で追加してください. |
||
340 | * |
||
341 | * @var string|null |
||
342 | * |
||
343 | * @ORM\Column(name="complete_mail_message", type="text", nullable=true) |
||
344 | */ |
||
345 | private $complete_mail_message; |
||
346 | |||
347 | /** |
||
348 | * @var \Doctrine\Common\Collections\Collection|OrderItem[] |
||
349 | * |
||
350 | * @ORM\OneToMany(targetEntity="Eccube\Entity\OrderItem", mappedBy="Order", cascade={"persist","remove"}) |
||
351 | */ |
||
352 | private $OrderItems; |
||
353 | |||
354 | /** |
||
355 | * @var \Doctrine\Common\Collections\Collection|Shipping[] |
||
356 | * |
||
357 | * @ORM\OneToMany(targetEntity="Eccube\Entity\Shipping", mappedBy="Order", cascade={"persist","remove"}) |
||
358 | */ |
||
359 | private $Shippings; |
||
360 | |||
361 | /** |
||
362 | * @var \Doctrine\Common\Collections\Collection |
||
363 | * |
||
364 | * @ORM\OneToMany(targetEntity="Eccube\Entity\MailHistory", mappedBy="Order", cascade={"remove"}) |
||
365 | * @ORM\OrderBy({ |
||
366 | * "send_date"="DESC" |
||
367 | * }) |
||
368 | */ |
||
369 | private $MailHistories; |
||
370 | |||
371 | /** |
||
372 | * @var \Eccube\Entity\Customer |
||
373 | * |
||
374 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Customer", inversedBy="Orders") |
||
375 | * @ORM\JoinColumns({ |
||
376 | * @ORM\JoinColumn(name="customer_id", referencedColumnName="id") |
||
377 | * }) |
||
378 | */ |
||
379 | private $Customer; |
||
380 | |||
381 | /** |
||
382 | * @var \Eccube\Entity\Master\Country |
||
383 | * |
||
384 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Country") |
||
385 | * @ORM\JoinColumns({ |
||
386 | * @ORM\JoinColumn(name="country_id", referencedColumnName="id") |
||
387 | * }) |
||
388 | */ |
||
389 | private $Country; |
||
390 | |||
391 | /** |
||
392 | * @var \Eccube\Entity\Master\Pref |
||
393 | * |
||
394 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Pref") |
||
395 | * @ORM\JoinColumns({ |
||
396 | * @ORM\JoinColumn(name="pref_id", referencedColumnName="id") |
||
397 | * }) |
||
398 | */ |
||
399 | private $Pref; |
||
400 | |||
401 | /** |
||
402 | * @var \Eccube\Entity\Master\Sex |
||
403 | * |
||
404 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Sex") |
||
405 | * @ORM\JoinColumns({ |
||
406 | * @ORM\JoinColumn(name="sex_id", referencedColumnName="id") |
||
407 | * }) |
||
408 | */ |
||
409 | private $Sex; |
||
410 | |||
411 | /** |
||
412 | * @var \Eccube\Entity\Master\Job |
||
413 | * |
||
414 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Job") |
||
415 | * @ORM\JoinColumns({ |
||
416 | * @ORM\JoinColumn(name="job_id", referencedColumnName="id") |
||
417 | * }) |
||
418 | */ |
||
419 | private $Job; |
||
420 | |||
421 | /** |
||
422 | * @var \Eccube\Entity\Payment |
||
423 | * |
||
424 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Payment") |
||
425 | * @ORM\JoinColumns({ |
||
426 | * @ORM\JoinColumn(name="payment_id", referencedColumnName="id") |
||
427 | * }) |
||
428 | */ |
||
429 | private $Payment; |
||
430 | |||
431 | /** |
||
432 | * @var \Eccube\Entity\Master\DeviceType |
||
433 | * |
||
434 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\DeviceType") |
||
435 | * @ORM\JoinColumns({ |
||
436 | * @ORM\JoinColumn(name="device_type_id", referencedColumnName="id") |
||
437 | * }) |
||
438 | */ |
||
439 | private $DeviceType; |
||
440 | |||
441 | /** |
||
442 | * @var \Eccube\Entity\Master\CustomerOrderStatus |
||
443 | * |
||
444 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\CustomerOrderStatus") |
||
445 | * @ORM\JoinColumns({ |
||
446 | * @ORM\JoinColumn(name="order_status_id", referencedColumnName="id") |
||
447 | * }) |
||
448 | */ |
||
449 | private $CustomerOrderStatus; |
||
450 | |||
451 | /** |
||
452 | * @var \Eccube\Entity\Master\OrderStatus |
||
453 | * |
||
454 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\OrderStatus") |
||
455 | * @ORM\JoinColumns({ |
||
456 | * @ORM\JoinColumn(name="order_status_id", referencedColumnName="id") |
||
457 | * }) |
||
458 | */ |
||
459 | private $OrderStatus; |
||
460 | |||
461 | /** |
||
462 | * Constructor |
||
463 | */ |
||
464 | 315 | public function __construct(\Eccube\Entity\Master\OrderStatus $orderStatus = null) |
|
480 | |||
481 | /** |
||
482 | * Clone |
||
483 | */ |
||
484 | 7 | public function __clone() |
|
492 | |||
493 | /** |
||
494 | * Get id. |
||
495 | * |
||
496 | * @return int |
||
497 | */ |
||
498 | 123 | public function getId() |
|
502 | |||
503 | /** |
||
504 | * Set preOrderId. |
||
505 | * |
||
506 | * @param string|null $preOrderId |
||
507 | * |
||
508 | * @return Order |
||
509 | */ |
||
510 | 208 | public function setPreOrderId($preOrderId = null) |
|
516 | |||
517 | /** |
||
518 | * Get preOrderId. |
||
519 | * |
||
520 | * @return string|null |
||
521 | */ |
||
522 | 53 | public function getPreOrderId() |
|
526 | |||
527 | /** |
||
528 | * Set orderNo |
||
529 | * |
||
530 | * @param string|null $orderNo |
||
531 | * |
||
532 | * @return Order |
||
533 | */ |
||
534 | 230 | public function setOrderNo($orderNo = null) |
|
540 | |||
541 | /** |
||
542 | * Get orderNo |
||
543 | * |
||
544 | * @return string|null |
||
545 | */ |
||
546 | 97 | public function getOrderNo() |
|
550 | |||
551 | /** |
||
552 | * Set message. |
||
553 | * |
||
554 | * @param string|null $message |
||
555 | * |
||
556 | * @return Order |
||
557 | */ |
||
558 | 184 | public function setMessage($message = null) |
|
564 | |||
565 | /** |
||
566 | * Get message. |
||
567 | * |
||
568 | * @return string|null |
||
569 | */ |
||
570 | 81 | public function getMessage() |
|
574 | |||
575 | /** |
||
576 | * Set name01. |
||
577 | * |
||
578 | * @param string|null $name01 |
||
579 | * |
||
580 | * @return Order |
||
581 | */ |
||
582 | 18 | public function setName01($name01 = null) |
|
588 | |||
589 | /** |
||
590 | * Get name01. |
||
591 | * |
||
592 | * @return string|null |
||
593 | */ |
||
594 | 80 | public function getName01() |
|
598 | |||
599 | /** |
||
600 | * Set name02. |
||
601 | * |
||
602 | * @param string|null $name02 |
||
603 | * |
||
604 | * @return Order |
||
605 | */ |
||
606 | 17 | public function setName02($name02 = null) |
|
612 | |||
613 | /** |
||
614 | * Get name02. |
||
615 | * |
||
616 | * @return string|null |
||
617 | */ |
||
618 | 80 | public function getName02() |
|
622 | |||
623 | /** |
||
624 | * Set kana01. |
||
625 | * |
||
626 | * @param string|null $kana01 |
||
627 | * |
||
628 | * @return Order |
||
629 | */ |
||
630 | 19 | public function setKana01($kana01 = null) |
|
636 | |||
637 | /** |
||
638 | * Get kana01. |
||
639 | * |
||
640 | * @return string|null |
||
641 | */ |
||
642 | 70 | public function getKana01() |
|
646 | |||
647 | /** |
||
648 | * Set kana02. |
||
649 | * |
||
650 | * @param string|null $kana02 |
||
651 | * |
||
652 | * @return Order |
||
653 | */ |
||
654 | 19 | public function setKana02($kana02 = null) |
|
660 | |||
661 | /** |
||
662 | * Get kana02. |
||
663 | * |
||
664 | * @return string|null |
||
665 | */ |
||
666 | 70 | public function getKana02() |
|
670 | |||
671 | /** |
||
672 | * Set companyName. |
||
673 | * |
||
674 | * @param string|null $companyName |
||
675 | * |
||
676 | * @return Order |
||
677 | */ |
||
678 | 16 | public function setCompanyName($companyName = null) |
|
684 | |||
685 | /** |
||
686 | * Get companyName. |
||
687 | * |
||
688 | * @return string|null |
||
689 | */ |
||
690 | 71 | public function getCompanyName() |
|
694 | |||
695 | /** |
||
696 | * Set email. |
||
697 | * |
||
698 | * @param string|null $email |
||
699 | * |
||
700 | * @return Order |
||
701 | */ |
||
702 | 16 | public function setEmail($email = null) |
|
708 | |||
709 | /** |
||
710 | * Get email. |
||
711 | * |
||
712 | * @return string|null |
||
713 | */ |
||
714 | 74 | public function getEmail() |
|
718 | |||
719 | /** |
||
720 | * Set phone_number. |
||
721 | * |
||
722 | * @param string|null $phone_number |
||
723 | * |
||
724 | * @return Order |
||
725 | */ |
||
726 | 17 | public function setPhoneNumber($phone_number = null) |
|
732 | |||
733 | /** |
||
734 | * Get phone_number. |
||
735 | * |
||
736 | * @return string|null |
||
737 | */ |
||
738 | 70 | public function getPhoneNumber() |
|
742 | |||
743 | /** |
||
744 | * Set postal_code. |
||
745 | * |
||
746 | * @param string|null $postal_code |
||
747 | * |
||
748 | * @return Order |
||
749 | */ |
||
750 | 16 | public function setPostalCode($postal_code = null) |
|
756 | |||
757 | /** |
||
758 | * Get postal_code. |
||
759 | * |
||
760 | * @return string|null |
||
761 | */ |
||
762 | 70 | public function getPostalCode() |
|
766 | |||
767 | /** |
||
768 | * Set addr01. |
||
769 | * |
||
770 | * @param string|null $addr01 |
||
771 | * |
||
772 | * @return Order |
||
773 | */ |
||
774 | 16 | public function setAddr01($addr01 = null) |
|
780 | |||
781 | /** |
||
782 | * Get addr01. |
||
783 | * |
||
784 | * @return string|null |
||
785 | */ |
||
786 | 73 | public function getAddr01() |
|
790 | |||
791 | /** |
||
792 | * Set addr02. |
||
793 | * |
||
794 | * @param string|null $addr02 |
||
795 | * |
||
796 | * @return Order |
||
797 | */ |
||
798 | 16 | public function setAddr02($addr02 = null) |
|
804 | |||
805 | /** |
||
806 | * Get addr02. |
||
807 | * |
||
808 | * @return string|null |
||
809 | */ |
||
810 | 73 | public function getAddr02() |
|
814 | |||
815 | /** |
||
816 | * Set birth. |
||
817 | * |
||
818 | * @param \DateTime|null $birth |
||
819 | * |
||
820 | * @return Order |
||
821 | */ |
||
822 | 5 | public function setBirth($birth = null) |
|
828 | |||
829 | /** |
||
830 | * Get birth. |
||
831 | * |
||
832 | * @return \DateTime|null |
||
833 | */ |
||
834 | 3 | public function getBirth() |
|
838 | |||
839 | /** |
||
840 | * Set subtotal. |
||
841 | * |
||
842 | * @param string $subtotal |
||
843 | * |
||
844 | * @return Order |
||
845 | */ |
||
846 | 315 | public function setSubtotal($subtotal) |
|
852 | |||
853 | /** |
||
854 | * Get subtotal. |
||
855 | * |
||
856 | * @return string |
||
857 | */ |
||
858 | 60 | public function getSubtotal() |
|
862 | |||
863 | /** |
||
864 | * Set discount. |
||
865 | * |
||
866 | * @param string $discount |
||
867 | * |
||
868 | * @return Order |
||
869 | */ |
||
870 | 315 | public function setDiscount($discount) |
|
876 | |||
877 | /** |
||
878 | * Get discount. |
||
879 | * |
||
880 | * @return string |
||
881 | */ |
||
882 | 215 | public function getDiscount() |
|
886 | |||
887 | /** |
||
888 | * Set deliveryFeeTotal. |
||
889 | * |
||
890 | * @param string $deliveryFeeTotal |
||
891 | * |
||
892 | * @return Order |
||
893 | */ |
||
894 | 315 | public function setDeliveryFeeTotal($deliveryFeeTotal) |
|
900 | |||
901 | /** |
||
902 | * Get deliveryFeeTotal. |
||
903 | * |
||
904 | * @return string |
||
905 | */ |
||
906 | 75 | public function getDeliveryFeeTotal() |
|
910 | |||
911 | /** |
||
912 | * Set charge. |
||
913 | * |
||
914 | * @param string $charge |
||
915 | * |
||
916 | * @return Order |
||
917 | */ |
||
918 | 315 | public function setCharge($charge) |
|
924 | |||
925 | /** |
||
926 | * Get charge. |
||
927 | * |
||
928 | * @return string |
||
929 | */ |
||
930 | 215 | public function getCharge() |
|
934 | |||
935 | /** |
||
936 | * Set tax. |
||
937 | * |
||
938 | * @param string $tax |
||
939 | * |
||
940 | * @return Order |
||
941 | */ |
||
942 | 315 | public function setTax($tax) |
|
948 | |||
949 | /** |
||
950 | * Get tax. |
||
951 | * |
||
952 | * @return string |
||
953 | */ |
||
954 | 16 | public function getTax() |
|
958 | |||
959 | /** |
||
960 | * Set total. |
||
961 | * |
||
962 | * @param string $total |
||
963 | * |
||
964 | * @return Order |
||
965 | */ |
||
966 | 315 | public function setTotal($total) |
|
972 | |||
973 | /** |
||
974 | * Get total. |
||
975 | * |
||
976 | * @return string |
||
977 | */ |
||
978 | 223 | public function getTotal() |
|
982 | |||
983 | /** |
||
984 | * Set paymentTotal. |
||
985 | * |
||
986 | * @param string $paymentTotal |
||
987 | * |
||
988 | * @return Order |
||
989 | */ |
||
990 | 315 | public function setPaymentTotal($paymentTotal) |
|
996 | |||
997 | /** |
||
998 | * Get paymentTotal. |
||
999 | * |
||
1000 | * @return string |
||
1001 | */ |
||
1002 | 28 | public function getPaymentTotal() |
|
1006 | |||
1007 | /** |
||
1008 | * Set paymentMethod. |
||
1009 | * |
||
1010 | * @param string|null $paymentMethod |
||
1011 | * |
||
1012 | * @return Order |
||
1013 | */ |
||
1014 | 221 | public function setPaymentMethod($paymentMethod = null) |
|
1020 | |||
1021 | /** |
||
1022 | * Get paymentMethod. |
||
1023 | * |
||
1024 | * @return string|null |
||
1025 | */ |
||
1026 | 20 | public function getPaymentMethod() |
|
1030 | |||
1031 | /** |
||
1032 | * Set note. |
||
1033 | * |
||
1034 | * @param string|null $note |
||
1035 | * |
||
1036 | * @return Order |
||
1037 | */ |
||
1038 | 159 | public function setNote($note = null) |
|
1044 | |||
1045 | /** |
||
1046 | * Get note. |
||
1047 | * |
||
1048 | * @return string|null |
||
1049 | */ |
||
1050 | 20 | public function getNote() |
|
1054 | |||
1055 | /** |
||
1056 | * Set createDate. |
||
1057 | * |
||
1058 | * @param \DateTime $createDate |
||
1059 | * |
||
1060 | * @return Order |
||
1061 | */ |
||
1062 | 210 | public function setCreateDate($createDate) |
|
1068 | |||
1069 | /** |
||
1070 | * Get createDate. |
||
1071 | * |
||
1072 | * @return \DateTime |
||
1073 | */ |
||
1074 | 3 | public function getCreateDate() |
|
1078 | |||
1079 | /** |
||
1080 | * Set updateDate. |
||
1081 | * |
||
1082 | * @param \DateTime $updateDate |
||
1083 | * |
||
1084 | * @return Order |
||
1085 | */ |
||
1086 | 210 | public function setUpdateDate($updateDate) |
|
1092 | |||
1093 | /** |
||
1094 | * Get updateDate. |
||
1095 | * |
||
1096 | * @return \DateTime |
||
1097 | */ |
||
1098 | 2 | public function getUpdateDate() |
|
1102 | |||
1103 | /** |
||
1104 | * Set orderDate. |
||
1105 | * |
||
1106 | * @param \DateTime|null $orderDate |
||
1107 | * |
||
1108 | * @return Order |
||
1109 | */ |
||
1110 | 47 | public function setOrderDate($orderDate = null) |
|
1116 | |||
1117 | /** |
||
1118 | * Get orderDate. |
||
1119 | * |
||
1120 | * @return \DateTime|null |
||
1121 | */ |
||
1122 | 33 | public function getOrderDate() |
|
1126 | |||
1127 | /** |
||
1128 | * Set paymentDate. |
||
1129 | * |
||
1130 | * @param \DateTime|null $paymentDate |
||
1131 | * |
||
1132 | * @return Order |
||
1133 | */ |
||
1134 | 4 | public function setPaymentDate($paymentDate = null) |
|
1140 | |||
1141 | /** |
||
1142 | * Get paymentDate. |
||
1143 | * |
||
1144 | * @return \DateTime|null |
||
1145 | */ |
||
1146 | 15 | public function getPaymentDate() |
|
1150 | |||
1151 | /** |
||
1152 | * Get currencyCode. |
||
1153 | * |
||
1154 | * @return string |
||
1155 | */ |
||
1156 | public function getCurrencyCode() |
||
1160 | |||
1161 | /** |
||
1162 | * Set currencyCode. |
||
1163 | * |
||
1164 | * @param string|null $currencyCode |
||
1165 | * |
||
1166 | * @return $this |
||
1167 | */ |
||
1168 | 210 | public function setCurrencyCode($currencyCode = null) |
|
1174 | |||
1175 | /** |
||
1176 | * @return null|string |
||
1177 | */ |
||
1178 | 1 | public function getCompleteMessage() |
|
1182 | |||
1183 | /** |
||
1184 | * @param null|string $complete_message |
||
1185 | * |
||
1186 | * @return $this |
||
1187 | */ |
||
1188 | public function setCompleteMessage($complete_message = null) |
||
1194 | |||
1195 | /** |
||
1196 | * @param null|string $complete_message |
||
1197 | * |
||
1198 | * @return $this |
||
1199 | */ |
||
1200 | public function appendCompleteMessage($complete_message = null) |
||
1206 | |||
1207 | /** |
||
1208 | * @return null|string |
||
1209 | */ |
||
1210 | 11 | public function getCompleteMailMessage() |
|
1214 | |||
1215 | /** |
||
1216 | * @param null|string $complete_mail_message |
||
1217 | * |
||
1218 | * @return |
||
1219 | */ |
||
1220 | public function setCompleteMailMessage($complete_mail_message = null) |
||
1226 | |||
1227 | /** |
||
1228 | * @param null|string $complete_mail_message |
||
1229 | * |
||
1230 | * @return |
||
1231 | */ |
||
1232 | public function appendCompleteMailMessage($complete_mail_message = null) |
||
1238 | |||
1239 | /** |
||
1240 | * 商品の受注明細を取得 |
||
1241 | * |
||
1242 | * @return OrderItem[] |
||
1243 | */ |
||
1244 | 36 | public function getProductOrderItems() |
|
1250 | |||
1251 | /** |
||
1252 | * 同じ規格の商品の個数をまとめた受注明細を取得 |
||
1253 | * |
||
1254 | * @return OrderItem[] |
||
1255 | */ |
||
1256 | 1 | public function getMergedProductOrderItems() |
|
1287 | |||
1288 | /** |
||
1289 | * Add orderItem. |
||
1290 | * |
||
1291 | * @param \Eccube\Entity\OrderItem $OrderItem |
||
1292 | * |
||
1293 | * @return Order |
||
1294 | */ |
||
1295 | 241 | 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 | 28 | public function removeOrderItem(\Eccube\Entity\OrderItem $OrderItem) |
|
1313 | |||
1314 | /** |
||
1315 | * Get orderItems. |
||
1316 | * |
||
1317 | * @return \Doctrine\Common\Collections\Collection|OrderItem[] |
||
1318 | */ |
||
1319 | 243 | public function getOrderItems() |
|
1323 | |||
1324 | /** |
||
1325 | * Sorted to getOrderItems() |
||
1326 | * |
||
1327 | * @return ItemCollection |
||
1328 | */ |
||
1329 | 232 | public function getItems() |
|
1333 | |||
1334 | /** |
||
1335 | * Add shipping. |
||
1336 | * |
||
1337 | * @param \Eccube\Entity\Shipping $Shipping |
||
1338 | * |
||
1339 | * @return Order |
||
1340 | */ |
||
1341 | 221 | 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 | 25 | public function removeShipping(\Eccube\Entity\Shipping $Shipping) |
|
1359 | |||
1360 | /** |
||
1361 | * Get shippings. |
||
1362 | * |
||
1363 | * @return \Doctrine\Common\Collections\Collection|\Eccube\Entity\Shipping[] |
||
1364 | */ |
||
1365 | 104 | 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 | 1 | public function getMailHistories() |
|
1408 | |||
1409 | /** |
||
1410 | * Set customer. |
||
1411 | * |
||
1412 | * @param \Eccube\Entity\Customer|null $customer |
||
1413 | * |
||
1414 | * @return Order |
||
1415 | */ |
||
1416 | 205 | public function setCustomer(\Eccube\Entity\Customer $customer = null) |
|
1422 | |||
1423 | /** |
||
1424 | * Get customer. |
||
1425 | * |
||
1426 | * @return \Eccube\Entity\Customer|null |
||
1427 | */ |
||
1428 | 234 | 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 | 170 | public function setPref(\Eccube\Entity\Master\Pref $pref = null) |
|
1470 | |||
1471 | /** |
||
1472 | * Get pref. |
||
1473 | * |
||
1474 | * @return \Eccube\Entity\Master\Pref|null |
||
1475 | */ |
||
1476 | 73 | public function getPref() |
|
1480 | |||
1481 | /** |
||
1482 | * Set sex. |
||
1483 | * |
||
1484 | * @param \Eccube\Entity\Master\Sex|null $sex |
||
1485 | * |
||
1486 | * @return Order |
||
1487 | */ |
||
1488 | 6 | public function setSex(\Eccube\Entity\Master\Sex $sex = null) |
|
1494 | |||
1495 | /** |
||
1496 | * Get sex. |
||
1497 | * |
||
1498 | * @return \Eccube\Entity\Master\Sex|null |
||
1499 | */ |
||
1500 | 3 | public function getSex() |
|
1504 | |||
1505 | /** |
||
1506 | * Set job. |
||
1507 | * |
||
1508 | * @param \Eccube\Entity\Master\Job|null $job |
||
1509 | * |
||
1510 | * @return Order |
||
1511 | */ |
||
1512 | 5 | public function setJob(\Eccube\Entity\Master\Job $job = null) |
|
1518 | |||
1519 | /** |
||
1520 | * Get job. |
||
1521 | * |
||
1522 | * @return \Eccube\Entity\Master\Job|null |
||
1523 | */ |
||
1524 | 3 | public function getJob() |
|
1528 | |||
1529 | /** |
||
1530 | * Set payment. |
||
1531 | * |
||
1532 | * @param \Eccube\Entity\Payment|null $payment |
||
1533 | * |
||
1534 | * @return Order |
||
1535 | */ |
||
1536 | 221 | public function setPayment(\Eccube\Entity\Payment $payment = null) |
|
1542 | |||
1543 | /** |
||
1544 | * Get payment. |
||
1545 | * |
||
1546 | * @return \Eccube\Entity\Payment|null |
||
1547 | */ |
||
1548 | 221 | public function getPayment() |
|
1552 | |||
1553 | /** |
||
1554 | * Set deviceType. |
||
1555 | * |
||
1556 | * @param \Eccube\Entity\Master\DeviceType|null $deviceType |
||
1557 | * |
||
1558 | * @return Order |
||
1559 | */ |
||
1560 | 51 | public function setDeviceType(\Eccube\Entity\Master\DeviceType $deviceType = null) |
|
1566 | |||
1567 | /** |
||
1568 | * Get deviceType. |
||
1569 | * |
||
1570 | * @return \Eccube\Entity\Master\DeviceType|null |
||
1571 | */ |
||
1572 | 2 | 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 | 315 | public function setOrderStatus(\Eccube\Entity\Master\OrderStatus $orderStatus = null) |
|
1614 | |||
1615 | /** |
||
1616 | * Get orderStatus. |
||
1617 | * |
||
1618 | * @return \Eccube\Entity\Master\OrderStatus|null |
||
1619 | */ |
||
1620 | 209 | public function getOrderStatus() |
|
1624 | |||
1625 | /** |
||
1626 | * @param ItemInterface $item |
||
1627 | */ |
||
1628 | 56 | public function addItem(ItemInterface $item) |
|
1632 | |||
1633 | 1 | public function getQuantity() |
|
1642 | } |
||
1643 |
If you suppress an error, we recommend checking for the error condition explicitly: