Complex classes like Customer 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 Customer, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
31 | class Customer extends \Eccube\Entity\AbstractEntity implements UserInterface, \Serializable |
||
32 | { |
||
33 | /** |
||
34 | * @var int |
||
35 | * |
||
36 | * @ORM\Column(name="id", type="integer", options={"unsigned":true}) |
||
37 | * @ORM\Id |
||
38 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
39 | */ |
||
40 | private $id; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | * |
||
45 | * @ORM\Column(name="name01", type="string", length=255) |
||
46 | */ |
||
47 | private $name01; |
||
48 | |||
49 | /** |
||
50 | * @var string |
||
51 | * |
||
52 | * @ORM\Column(name="name02", type="string", length=255) |
||
53 | */ |
||
54 | private $name02; |
||
55 | |||
56 | /** |
||
57 | * @var string|null |
||
58 | * |
||
59 | * @ORM\Column(name="kana01", type="string", length=255, nullable=true) |
||
60 | */ |
||
61 | private $kana01; |
||
62 | |||
63 | /** |
||
64 | * @var string|null |
||
65 | * |
||
66 | * @ORM\Column(name="kana02", type="string", length=255, nullable=true) |
||
67 | */ |
||
68 | private $kana02; |
||
69 | |||
70 | /** |
||
71 | * @var string|null |
||
72 | * |
||
73 | * @ORM\Column(name="company_name", type="string", length=255, nullable=true) |
||
74 | */ |
||
75 | private $company_name; |
||
76 | |||
77 | /** |
||
78 | * @var string|null |
||
79 | * |
||
80 | * @ORM\Column(name="postal_code", type="string", length=8, nullable=true) |
||
81 | */ |
||
82 | private $postal_code; |
||
83 | |||
84 | /** |
||
85 | * @var string|null |
||
86 | * |
||
87 | * @ORM\Column(name="addr01", type="string", length=255, nullable=true) |
||
88 | */ |
||
89 | private $addr01; |
||
90 | |||
91 | /** |
||
92 | * @var string|null |
||
93 | * |
||
94 | * @ORM\Column(name="addr02", type="string", length=255, nullable=true) |
||
95 | */ |
||
96 | private $addr02; |
||
97 | |||
98 | /** |
||
99 | * @var string |
||
100 | * |
||
101 | * @ORM\Column(name="email", type="string", length=255) |
||
102 | */ |
||
103 | private $email; |
||
104 | |||
105 | /** |
||
106 | * @var string|null |
||
107 | * |
||
108 | * @ORM\Column(name="phone_number", type="string", length=14, nullable=true) |
||
109 | */ |
||
110 | private $phone_number; |
||
111 | |||
112 | /** |
||
113 | * @var \DateTime|null |
||
114 | * |
||
115 | * @ORM\Column(name="birth", type="datetimetz", nullable=true) |
||
116 | */ |
||
117 | private $birth; |
||
118 | |||
119 | /** |
||
120 | * @var string|null |
||
121 | * |
||
122 | * @ORM\Column(name="password", type="string", length=255) |
||
123 | */ |
||
124 | private $password; |
||
125 | |||
126 | /** |
||
127 | * @var string|null |
||
128 | * |
||
129 | * @ORM\Column(name="salt", type="string", length=255, nullable=true) |
||
130 | */ |
||
131 | private $salt; |
||
132 | |||
133 | /** |
||
134 | * @var string |
||
135 | * |
||
136 | * @ORM\Column(name="secret_key", type="string", length=255) |
||
137 | */ |
||
138 | private $secret_key; |
||
139 | |||
140 | /** |
||
141 | * @var \DateTime|null |
||
142 | * |
||
143 | * @ORM\Column(name="first_buy_date", type="datetimetz", nullable=true) |
||
144 | */ |
||
145 | private $first_buy_date; |
||
146 | |||
147 | /** |
||
148 | * @var \DateTime|null |
||
149 | * |
||
150 | * @ORM\Column(name="last_buy_date", type="datetimetz", nullable=true) |
||
151 | */ |
||
152 | private $last_buy_date; |
||
153 | |||
154 | /** |
||
155 | * @var string|null |
||
156 | * |
||
157 | * @ORM\Column(name="buy_times", type="decimal", precision=10, scale=0, nullable=true, options={"unsigned":true,"default":0}) |
||
158 | */ |
||
159 | private $buy_times = 0; |
||
160 | |||
161 | /** |
||
162 | * @var string|null |
||
163 | * |
||
164 | * @ORM\Column(name="buy_total", type="decimal", precision=12, scale=2, nullable=true, options={"unsigned":true,"default":0}) |
||
165 | */ |
||
166 | private $buy_total = 0; |
||
167 | |||
168 | /** |
||
169 | * @var string|null |
||
170 | * |
||
171 | * @ORM\Column(name="note", type="string", length=4000, nullable=true) |
||
172 | */ |
||
173 | private $note; |
||
174 | |||
175 | /** |
||
176 | * @var string|null |
||
177 | * |
||
178 | * @ORM\Column(name="reset_key", type="string", length=255, nullable=true) |
||
179 | */ |
||
180 | private $reset_key; |
||
181 | |||
182 | /** |
||
183 | * @var \DateTime|null |
||
184 | * |
||
185 | * @ORM\Column(name="reset_expire", type="datetimetz", nullable=true) |
||
186 | */ |
||
187 | private $reset_expire; |
||
188 | |||
189 | /** |
||
190 | * @var string |
||
191 | * |
||
192 | * @ORM\Column(name="point", type="decimal", precision=12, scale=0, options={"unsigned":false,"default":0}) |
||
193 | */ |
||
194 | private $point = '0'; |
||
195 | |||
196 | /** |
||
197 | * @var \DateTime |
||
198 | * |
||
199 | * @ORM\Column(name="create_date", type="datetimetz") |
||
200 | */ |
||
201 | private $create_date; |
||
202 | |||
203 | /** |
||
204 | * @var \DateTime |
||
205 | * |
||
206 | * @ORM\Column(name="update_date", type="datetimetz") |
||
207 | */ |
||
208 | private $update_date; |
||
209 | |||
210 | /** |
||
211 | * @var \Doctrine\Common\Collections\Collection |
||
212 | * |
||
213 | * @ORM\OneToMany(targetEntity="Eccube\Entity\CustomerFavoriteProduct", mappedBy="Customer", cascade={"remove"}) |
||
214 | */ |
||
215 | private $CustomerFavoriteProducts; |
||
216 | |||
217 | /** |
||
218 | * @var \Doctrine\Common\Collections\Collection |
||
219 | * |
||
220 | * @ORM\OneToMany(targetEntity="Eccube\Entity\CustomerAddress", mappedBy="Customer", cascade={"remove"}) |
||
221 | * @ORM\OrderBy({ |
||
222 | * "id"="ASC" |
||
223 | * }) |
||
224 | */ |
||
225 | private $CustomerAddresses; |
||
226 | |||
227 | /** |
||
228 | * @var \Doctrine\Common\Collections\Collection |
||
229 | * |
||
230 | * @ORM\OneToMany(targetEntity="Eccube\Entity\Order", mappedBy="Customer") |
||
231 | */ |
||
232 | private $Orders; |
||
233 | |||
234 | /** |
||
235 | * @var \Eccube\Entity\Master\CustomerStatus |
||
236 | * |
||
237 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\CustomerStatus") |
||
238 | * @ORM\JoinColumns({ |
||
239 | * @ORM\JoinColumn(name="customer_status_id", referencedColumnName="id") |
||
240 | * }) |
||
241 | */ |
||
242 | private $Status; |
||
243 | |||
244 | /** |
||
245 | * @var \Eccube\Entity\Master\Sex |
||
246 | * |
||
247 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Sex") |
||
248 | * @ORM\JoinColumns({ |
||
249 | * @ORM\JoinColumn(name="sex_id", referencedColumnName="id") |
||
250 | * }) |
||
251 | */ |
||
252 | private $Sex; |
||
253 | |||
254 | /** |
||
255 | * @var \Eccube\Entity\Master\Job |
||
256 | * |
||
257 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Job") |
||
258 | * @ORM\JoinColumns({ |
||
259 | * @ORM\JoinColumn(name="job_id", referencedColumnName="id") |
||
260 | * }) |
||
261 | */ |
||
262 | private $Job; |
||
263 | |||
264 | /** |
||
265 | * @var \Eccube\Entity\Master\Country |
||
266 | * |
||
267 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Country") |
||
268 | * @ORM\JoinColumns({ |
||
269 | * @ORM\JoinColumn(name="country_id", referencedColumnName="id") |
||
270 | * }) |
||
271 | */ |
||
272 | private $Country; |
||
273 | |||
274 | /** |
||
275 | * @var \Eccube\Entity\Master\Pref |
||
276 | * |
||
277 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Pref") |
||
278 | * @ORM\JoinColumns({ |
||
279 | * @ORM\JoinColumn(name="pref_id", referencedColumnName="id") |
||
280 | * }) |
||
281 | */ |
||
282 | private $Pref; |
||
283 | |||
284 | /** |
||
285 | * Constructor |
||
286 | */ |
||
287 | 414 | public function __construct() |
|
288 | { |
||
289 | 414 | $this->CustomerFavoriteProducts = new \Doctrine\Common\Collections\ArrayCollection(); |
|
290 | 414 | $this->CustomerAddresses = new \Doctrine\Common\Collections\ArrayCollection(); |
|
291 | 414 | $this->Orders = new \Doctrine\Common\Collections\ArrayCollection(); |
|
292 | |||
293 | 414 | $this->setBuyTimes(0); |
|
294 | 414 | $this->setBuyTotal(0); |
|
295 | } |
||
296 | |||
297 | /** |
||
298 | * @return string |
||
299 | */ |
||
300 | public function __toString() |
||
301 | { |
||
302 | return (string) ($this->getName01().' '.$this->getName02()); |
||
303 | } |
||
304 | |||
305 | /** |
||
306 | * {@inheritdoc} |
||
307 | */ |
||
308 | 2 | public function getRoles() |
|
309 | { |
||
310 | 2 | return ['ROLE_USER']; |
|
311 | } |
||
312 | |||
313 | /** |
||
314 | * {@inheritdoc} |
||
315 | */ |
||
316 | 77 | public function getUsername() |
|
317 | { |
||
318 | 77 | return $this->email; |
|
319 | } |
||
320 | |||
321 | /** |
||
322 | * {@inheritdoc} |
||
323 | */ |
||
324 | public function eraseCredentials() |
||
327 | |||
328 | // TODO: できればFormTypeで行いたい |
||
329 | 45 | public static function loadValidatorMetadata(ClassMetadata $metadata) |
|
330 | { |
||
331 | 45 | $metadata->addConstraint(new UniqueEntity([ |
|
337 | |||
338 | /** |
||
339 | * Get id. |
||
340 | * |
||
341 | * @return int |
||
342 | */ |
||
343 | 124 | public function getId() |
|
347 | |||
348 | /** |
||
349 | * Set name01. |
||
350 | * |
||
351 | * @param string $name01 |
||
352 | * |
||
353 | * @return Customer |
||
354 | */ |
||
355 | 354 | public function setName01($name01) |
|
361 | |||
362 | /** |
||
363 | * Get name01. |
||
364 | * |
||
365 | * @return string |
||
366 | */ |
||
367 | 136 | public function getName01() |
|
371 | |||
372 | /** |
||
373 | * Set name02. |
||
374 | * |
||
375 | * @param string $name02 |
||
376 | * |
||
377 | * @return Customer |
||
378 | */ |
||
379 | 354 | public function setName02($name02) |
|
385 | |||
386 | /** |
||
387 | * Get name02. |
||
388 | * |
||
389 | * @return string |
||
390 | */ |
||
391 | 133 | public function getName02() |
|
395 | |||
396 | /** |
||
397 | * Set kana01. |
||
398 | * |
||
399 | * @param string|null $kana01 |
||
400 | * |
||
401 | * @return Customer |
||
402 | */ |
||
403 | 354 | public function setKana01($kana01 = null) |
|
409 | |||
410 | /** |
||
411 | * Get kana01. |
||
412 | * |
||
413 | * @return string|null |
||
414 | */ |
||
415 | 110 | public function getKana01() |
|
419 | |||
420 | /** |
||
421 | * Set kana02. |
||
422 | * |
||
423 | * @param string|null $kana02 |
||
424 | * |
||
425 | * @return Customer |
||
426 | */ |
||
427 | 354 | public function setKana02($kana02 = null) |
|
433 | |||
434 | /** |
||
435 | * Get kana02. |
||
436 | * |
||
437 | * @return string|null |
||
438 | */ |
||
439 | 111 | public function getKana02() |
|
443 | |||
444 | /** |
||
445 | * Set companyName. |
||
446 | * |
||
447 | * @param string|null $companyName |
||
448 | * |
||
449 | * @return Customer |
||
450 | */ |
||
451 | 341 | public function setCompanyName($companyName = null) |
|
457 | |||
458 | /** |
||
459 | * Get companyName. |
||
460 | * |
||
461 | * @return string|null |
||
462 | */ |
||
463 | 106 | public function getCompanyName() |
|
467 | |||
468 | /** |
||
469 | * Set postal_code. |
||
470 | * |
||
471 | * @param string|null $postal_code |
||
472 | * |
||
473 | * @return Customer |
||
474 | */ |
||
475 | 354 | public function setPostalCode($postal_code = null) |
|
481 | |||
482 | /** |
||
483 | * Get postal_code. |
||
484 | * |
||
485 | * @return string|null |
||
486 | */ |
||
487 | 107 | public function getPostalCode() |
|
491 | |||
492 | /** |
||
493 | * Set addr01. |
||
494 | * |
||
495 | * @param string|null $addr01 |
||
496 | * |
||
497 | * @return Customer |
||
498 | */ |
||
499 | 354 | public function setAddr01($addr01 = null) |
|
505 | |||
506 | /** |
||
507 | * Get addr01. |
||
508 | * |
||
509 | * @return string|null |
||
510 | */ |
||
511 | 107 | public function getAddr01() |
|
515 | |||
516 | /** |
||
517 | * Set addr02. |
||
518 | * |
||
519 | * @param string|null $addr02 |
||
520 | * |
||
521 | * @return Customer |
||
522 | */ |
||
523 | 354 | public function setAddr02($addr02 = null) |
|
529 | |||
530 | /** |
||
531 | * Get addr02. |
||
532 | * |
||
533 | * @return string|null |
||
534 | */ |
||
535 | 107 | public function getAddr02() |
|
539 | |||
540 | /** |
||
541 | * Set email. |
||
542 | * |
||
543 | * @param string $email |
||
544 | * |
||
545 | * @return Customer |
||
546 | */ |
||
547 | 354 | public function setEmail($email) |
|
553 | |||
554 | /** |
||
555 | * Get email. |
||
556 | * |
||
557 | * @return string |
||
558 | */ |
||
559 | 75 | public function getEmail() |
|
563 | |||
564 | /** |
||
565 | * Set phone_number. |
||
566 | * |
||
567 | * @param string|null $phone_number |
||
568 | * |
||
569 | * @return Customer |
||
570 | */ |
||
571 | 354 | public function setPhoneNumber($phone_number = null) |
|
577 | |||
578 | /** |
||
579 | * Get phone_number. |
||
580 | * |
||
581 | * @return string|null |
||
582 | */ |
||
583 | 115 | public function getPhoneNumber() |
|
587 | |||
588 | /** |
||
589 | * Set birth. |
||
590 | * |
||
591 | * @param \DateTime|null $birth |
||
592 | * |
||
593 | * @return Customer |
||
594 | */ |
||
595 | 340 | public function setBirth($birth = null) |
|
601 | |||
602 | /** |
||
603 | * Get birth. |
||
604 | * |
||
605 | * @return \DateTime|null |
||
606 | */ |
||
607 | 59 | public function getBirth() |
|
611 | |||
612 | /** |
||
613 | * Set password. |
||
614 | * |
||
615 | * @param string|null $password |
||
616 | * |
||
617 | * @return Customer |
||
618 | */ |
||
619 | 336 | public function setPassword($password = null) |
|
625 | |||
626 | /** |
||
627 | * Get password. |
||
628 | * |
||
629 | * @return string|null |
||
630 | */ |
||
631 | 123 | public function getPassword() |
|
635 | |||
636 | /** |
||
637 | * Set salt. |
||
638 | * |
||
639 | * @param string|null $salt |
||
640 | * |
||
641 | * @return Customer |
||
642 | */ |
||
643 | 300 | public function setSalt($salt = null) |
|
649 | |||
650 | /** |
||
651 | * Get salt. |
||
652 | * |
||
653 | * @return string|null |
||
654 | */ |
||
655 | 78 | public function getSalt() |
|
659 | |||
660 | /** |
||
661 | * Set secretKey. |
||
662 | * |
||
663 | * @param string $secretKey |
||
664 | * |
||
665 | * @return Customer |
||
666 | */ |
||
667 | 300 | public function setSecretKey($secretKey) |
|
673 | |||
674 | /** |
||
675 | * Get secretKey. |
||
676 | * |
||
677 | * @return string |
||
678 | */ |
||
679 | 5 | public function getSecretKey() |
|
683 | |||
684 | /** |
||
685 | * Set firstBuyDate. |
||
686 | * |
||
687 | * @param \DateTime|null $firstBuyDate |
||
688 | * |
||
689 | * @return Customer |
||
690 | */ |
||
691 | 12 | public function setFirstBuyDate($firstBuyDate = null) |
|
697 | |||
698 | /** |
||
699 | * Get firstBuyDate. |
||
700 | * |
||
701 | * @return \DateTime|null |
||
702 | */ |
||
703 | 7 | public function getFirstBuyDate() |
|
707 | |||
708 | /** |
||
709 | * Set lastBuyDate. |
||
710 | * |
||
711 | * @param \DateTime|null $lastBuyDate |
||
712 | * |
||
713 | * @return Customer |
||
714 | */ |
||
715 | 14 | public function setLastBuyDate($lastBuyDate = null) |
|
721 | |||
722 | /** |
||
723 | * Get lastBuyDate. |
||
724 | * |
||
725 | * @return \DateTime|null |
||
726 | */ |
||
727 | 4 | public function getLastBuyDate() |
|
731 | |||
732 | /** |
||
733 | * Set buyTimes. |
||
734 | * |
||
735 | * @param string|null $buyTimes |
||
736 | * |
||
737 | * @return Customer |
||
738 | */ |
||
739 | 414 | public function setBuyTimes($buyTimes = null) |
|
745 | |||
746 | /** |
||
747 | * Get buyTimes. |
||
748 | * |
||
749 | * @return string|null |
||
750 | */ |
||
751 | 7 | public function getBuyTimes() |
|
755 | |||
756 | /** |
||
757 | * Set buyTotal. |
||
758 | * |
||
759 | * @param string|null $buyTotal |
||
760 | * |
||
761 | * @return Customer |
||
762 | */ |
||
763 | 414 | public function setBuyTotal($buyTotal = null) |
|
769 | |||
770 | /** |
||
771 | * Get buyTotal. |
||
772 | * |
||
773 | * @return string|null |
||
774 | */ |
||
775 | 5 | public function getBuyTotal() |
|
779 | |||
780 | /** |
||
781 | * Set note. |
||
782 | * |
||
783 | * @param string|null $note |
||
784 | * |
||
785 | * @return Customer |
||
786 | */ |
||
787 | 22 | public function setNote($note = null) |
|
793 | |||
794 | /** |
||
795 | * Get note. |
||
796 | * |
||
797 | * @return string|null |
||
798 | */ |
||
799 | 31 | public function getNote() |
|
803 | |||
804 | /** |
||
805 | * Set resetKey. |
||
806 | * |
||
807 | * @param string|null $resetKey |
||
808 | * |
||
809 | * @return Customer |
||
810 | */ |
||
811 | 2 | public function setResetKey($resetKey = null) |
|
817 | |||
818 | /** |
||
819 | * Get resetKey. |
||
820 | * |
||
821 | * @return string|null |
||
822 | */ |
||
823 | public function getResetKey() |
||
827 | |||
828 | /** |
||
829 | * Set resetExpire. |
||
830 | * |
||
831 | * @param \DateTime|null $resetExpire |
||
832 | * |
||
833 | * @return Customer |
||
834 | */ |
||
835 | 2 | public function setResetExpire($resetExpire = null) |
|
841 | |||
842 | /** |
||
843 | * Get resetExpire. |
||
844 | * |
||
845 | * @return \DateTime|null |
||
846 | */ |
||
847 | public function getResetExpire() |
||
851 | |||
852 | /** |
||
853 | * Set createDate. |
||
854 | * |
||
855 | * @param \DateTime $createDate |
||
856 | * |
||
857 | * @return Customer |
||
858 | */ |
||
859 | 300 | public function setCreateDate($createDate) |
|
865 | |||
866 | /** |
||
867 | * Get createDate. |
||
868 | * |
||
869 | * @return \DateTime |
||
870 | */ |
||
871 | 1 | public function getCreateDate() |
|
875 | |||
876 | /** |
||
877 | * Set updateDate. |
||
878 | * |
||
879 | * @param \DateTime $updateDate |
||
880 | * |
||
881 | * @return Customer |
||
882 | */ |
||
883 | 300 | public function setUpdateDate($updateDate) |
|
889 | |||
890 | /** |
||
891 | * Get updateDate. |
||
892 | * |
||
893 | * @return \DateTime |
||
894 | */ |
||
895 | 1 | public function getUpdateDate() |
|
899 | |||
900 | /** |
||
901 | * Add customerFavoriteProduct. |
||
902 | * |
||
903 | * @param \Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct |
||
904 | * |
||
905 | * @return Customer |
||
906 | */ |
||
907 | public function addCustomerFavoriteProduct(\Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct) |
||
913 | |||
914 | /** |
||
915 | * Remove customerFavoriteProduct. |
||
916 | * |
||
917 | * @param \Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct |
||
918 | * |
||
919 | * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. |
||
920 | */ |
||
921 | public function removeCustomerFavoriteProduct(\Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct) |
||
925 | |||
926 | /** |
||
927 | * Get customerFavoriteProducts. |
||
928 | * |
||
929 | * @return \Doctrine\Common\Collections\Collection |
||
930 | */ |
||
931 | public function getCustomerFavoriteProducts() |
||
935 | |||
936 | /** |
||
937 | * Add customerAddress. |
||
938 | * |
||
939 | * @param \Eccube\Entity\CustomerAddress $customerAddress |
||
940 | * |
||
941 | * @return Customer |
||
942 | */ |
||
943 | 7 | public function addCustomerAddress(\Eccube\Entity\CustomerAddress $customerAddress) |
|
949 | |||
950 | /** |
||
951 | * Remove customerAddress. |
||
952 | * |
||
953 | * @param \Eccube\Entity\CustomerAddress $customerAddress |
||
954 | * |
||
955 | * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. |
||
956 | */ |
||
957 | public function removeCustomerAddress(\Eccube\Entity\CustomerAddress $customerAddress) |
||
961 | |||
962 | /** |
||
963 | * Get customerAddresses. |
||
964 | * |
||
965 | * @return \Doctrine\Common\Collections\Collection |
||
966 | */ |
||
967 | 21 | public function getCustomerAddresses() |
|
971 | |||
972 | /** |
||
973 | * Add order. |
||
974 | * |
||
975 | * @param \Eccube\Entity\Order $order |
||
976 | * |
||
977 | * @return Customer |
||
978 | */ |
||
979 | 2 | public function addOrder(\Eccube\Entity\Order $order) |
|
985 | |||
986 | /** |
||
987 | * Remove order. |
||
988 | * |
||
989 | * @param \Eccube\Entity\Order $order |
||
990 | * |
||
991 | * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. |
||
992 | */ |
||
993 | public function removeOrder(\Eccube\Entity\Order $order) |
||
997 | |||
998 | /** |
||
999 | * Get orders. |
||
1000 | * |
||
1001 | * @return \Doctrine\Common\Collections\Collection |
||
1002 | */ |
||
1003 | 4 | public function getOrders() |
|
1007 | |||
1008 | /** |
||
1009 | * Set status. |
||
1010 | * |
||
1011 | * @param \Eccube\Entity\Master\CustomerStatus|null $status |
||
1012 | * |
||
1013 | * @return Customer |
||
1014 | */ |
||
1015 | 326 | public function setStatus(\Eccube\Entity\Master\CustomerStatus $status = null) |
|
1021 | |||
1022 | /** |
||
1023 | * Get status. |
||
1024 | * |
||
1025 | * @return \Eccube\Entity\Master\CustomerStatus|null |
||
1026 | */ |
||
1027 | 39 | public function getStatus() |
|
1031 | |||
1032 | /** |
||
1033 | * Set sex. |
||
1034 | * |
||
1035 | * @param \Eccube\Entity\Master\Sex|null $sex |
||
1036 | * |
||
1037 | * @return Customer |
||
1038 | */ |
||
1039 | 338 | public function setSex(\Eccube\Entity\Master\Sex $sex = null) |
|
1045 | |||
1046 | /** |
||
1047 | * Get sex. |
||
1048 | * |
||
1049 | * @return \Eccube\Entity\Master\Sex|null |
||
1050 | */ |
||
1051 | 59 | public function getSex() |
|
1055 | |||
1056 | /** |
||
1057 | * Set job. |
||
1058 | * |
||
1059 | * @param \Eccube\Entity\Master\Job|null $job |
||
1060 | * |
||
1061 | * @return Customer |
||
1062 | */ |
||
1063 | 338 | public function setJob(\Eccube\Entity\Master\Job $job = null) |
|
1069 | |||
1070 | /** |
||
1071 | * Get job. |
||
1072 | * |
||
1073 | * @return \Eccube\Entity\Master\Job|null |
||
1074 | */ |
||
1075 | 59 | public function getJob() |
|
1079 | |||
1080 | /** |
||
1081 | * Set country. |
||
1082 | * |
||
1083 | * @param \Eccube\Entity\Master\Country|null $country |
||
1084 | * |
||
1085 | * @return Customer |
||
1086 | */ |
||
1087 | public function setCountry(\Eccube\Entity\Master\Country $country = null) |
||
1093 | |||
1094 | /** |
||
1095 | * Get country. |
||
1096 | * |
||
1097 | * @return \Eccube\Entity\Master\Country|null |
||
1098 | */ |
||
1099 | 52 | public function getCountry() |
|
1103 | |||
1104 | /** |
||
1105 | * Set pref. |
||
1106 | * |
||
1107 | * @param \Eccube\Entity\Master\Pref|null $pref |
||
1108 | * |
||
1109 | * @return Customer |
||
1110 | */ |
||
1111 | 354 | public function setPref(\Eccube\Entity\Master\Pref $pref = null) |
|
1117 | |||
1118 | /** |
||
1119 | * Get pref. |
||
1120 | * |
||
1121 | * @return \Eccube\Entity\Master\Pref|null |
||
1122 | */ |
||
1123 | 126 | public function getPref() |
|
1127 | |||
1128 | /** |
||
1129 | * Set point |
||
1130 | * |
||
1131 | * @param string $point |
||
1132 | * |
||
1133 | * @return Customer |
||
1134 | */ |
||
1135 | 375 | public function setPoint($point) |
|
1141 | |||
1142 | /** |
||
1143 | * Get point |
||
1144 | * |
||
1145 | * @return string |
||
1146 | */ |
||
1147 | 133 | public function getPoint() |
|
1151 | |||
1152 | /** |
||
1153 | * String representation of object |
||
1154 | * @link http://php.net/manual/en/serializable.serialize.php |
||
1155 | * @return string the string representation of the object or null |
||
1156 | * @since 5.1.0 |
||
1157 | */ |
||
1158 | public function serialize() |
||
1169 | |||
1170 | /** |
||
1171 | * Constructs the object |
||
1172 | * @link http://php.net/manual/en/serializable.unserialize.php |
||
1173 | * @param string $serialized <p> |
||
1174 | * The string representation of the object. |
||
1175 | * </p> |
||
1176 | * @return void |
||
1177 | * @since 5.1.0 |
||
1178 | */ |
||
1179 | public function unserialize($serialized) |
||
1188 | } |
||
1189 | } |
||
1190 |