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 |
||
| 30 | class Customer extends \Eccube\Entity\AbstractEntity implements UserInterface |
||
| 31 | { |
||
| 32 | /** |
||
| 33 | * @var int |
||
| 34 | * |
||
| 35 | * @ORM\Column(name="id", type="integer", options={"unsigned":true}) |
||
| 36 | * @ORM\Id |
||
| 37 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
| 38 | */ |
||
| 39 | private $id; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @var string |
||
| 43 | * |
||
| 44 | * @ORM\Column(name="name01", type="string", length=255) |
||
| 45 | */ |
||
| 46 | private $name01; |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @var string |
||
| 50 | * |
||
| 51 | * @ORM\Column(name="name02", type="string", length=255) |
||
| 52 | */ |
||
| 53 | private $name02; |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @var string|null |
||
| 57 | * |
||
| 58 | * @ORM\Column(name="kana01", type="string", length=255, nullable=true) |
||
| 59 | */ |
||
| 60 | private $kana01; |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @var string|null |
||
| 64 | * |
||
| 65 | * @ORM\Column(name="kana02", type="string", length=255, nullable=true) |
||
| 66 | */ |
||
| 67 | private $kana02; |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @var string|null |
||
| 71 | * |
||
| 72 | * @ORM\Column(name="company_name", type="string", length=255, nullable=true) |
||
| 73 | */ |
||
| 74 | private $company_name; |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @var string|null |
||
| 78 | * |
||
| 79 | * @ORM\Column(name="zip01", type="string", length=3, nullable=true) |
||
| 80 | */ |
||
| 81 | private $zip01; |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @var string|null |
||
| 85 | * |
||
| 86 | * @ORM\Column(name="zip02", type="string", length=4, nullable=true) |
||
| 87 | */ |
||
| 88 | private $zip02; |
||
| 89 | |||
| 90 | /** |
||
| 91 | * @var string|null |
||
| 92 | * |
||
| 93 | * @ORM\Column(name="zipcode", type="string", length=7, nullable=true) |
||
| 94 | */ |
||
| 95 | private $zipcode; |
||
| 96 | |||
| 97 | /** |
||
| 98 | * @var string|null |
||
| 99 | * |
||
| 100 | * @ORM\Column(name="addr01", type="string", length=255, nullable=true) |
||
| 101 | */ |
||
| 102 | private $addr01; |
||
| 103 | |||
| 104 | /** |
||
| 105 | * @var string|null |
||
| 106 | * |
||
| 107 | * @ORM\Column(name="addr02", type="string", length=255, nullable=true) |
||
| 108 | */ |
||
| 109 | private $addr02; |
||
| 110 | |||
| 111 | /** |
||
| 112 | * @var string |
||
| 113 | * |
||
| 114 | * @ORM\Column(name="email", type="string", length=255) |
||
| 115 | */ |
||
| 116 | private $email; |
||
| 117 | |||
| 118 | /** |
||
| 119 | * @var string|null |
||
| 120 | * |
||
| 121 | * @ORM\Column(name="tel01", type="string", length=5, nullable=true) |
||
| 122 | */ |
||
| 123 | private $tel01; |
||
| 124 | |||
| 125 | /** |
||
| 126 | * @var string|null |
||
| 127 | * |
||
| 128 | * @ORM\Column(name="tel02", type="string", length=4, nullable=true) |
||
| 129 | */ |
||
| 130 | private $tel02; |
||
| 131 | |||
| 132 | /** |
||
| 133 | * @var string|null |
||
| 134 | * |
||
| 135 | * @ORM\Column(name="tel03", type="string", length=4, nullable=true) |
||
| 136 | */ |
||
| 137 | private $tel03; |
||
| 138 | |||
| 139 | /** |
||
| 140 | * @var string|null |
||
| 141 | * |
||
| 142 | * @ORM\Column(name="fax01", type="string", length=5, nullable=true) |
||
| 143 | */ |
||
| 144 | private $fax01; |
||
| 145 | |||
| 146 | /** |
||
| 147 | * @var string|null |
||
| 148 | * |
||
| 149 | * @ORM\Column(name="fax02", type="string", length=4, nullable=true) |
||
| 150 | */ |
||
| 151 | private $fax02; |
||
| 152 | |||
| 153 | /** |
||
| 154 | * @var string|null |
||
| 155 | * |
||
| 156 | * @ORM\Column(name="fax03", type="string", length=4, nullable=true) |
||
| 157 | */ |
||
| 158 | private $fax03; |
||
| 159 | |||
| 160 | /** |
||
| 161 | * @var \DateTime|null |
||
| 162 | * |
||
| 163 | * @ORM\Column(name="birth", type="datetimetz", nullable=true) |
||
| 164 | */ |
||
| 165 | private $birth; |
||
| 166 | |||
| 167 | /** |
||
| 168 | * @var string|null |
||
| 169 | * |
||
| 170 | * @ORM\Column(name="password", type="string", length=255, nullable=true) |
||
| 171 | */ |
||
| 172 | private $password; |
||
| 173 | |||
| 174 | /** |
||
| 175 | * @var string|null |
||
| 176 | * |
||
| 177 | * @ORM\Column(name="salt", type="string", length=255, nullable=true) |
||
| 178 | */ |
||
| 179 | private $salt; |
||
| 180 | |||
| 181 | /** |
||
| 182 | * @var string |
||
| 183 | * |
||
| 184 | * @ORM\Column(name="secret_key", type="string", length=255) |
||
| 185 | */ |
||
| 186 | private $secret_key; |
||
| 187 | |||
| 188 | /** |
||
| 189 | * @var \DateTime|null |
||
| 190 | * |
||
| 191 | * @ORM\Column(name="first_buy_date", type="datetimetz", nullable=true) |
||
| 192 | */ |
||
| 193 | private $first_buy_date; |
||
| 194 | |||
| 195 | /** |
||
| 196 | * @var \DateTime|null |
||
| 197 | * |
||
| 198 | * @ORM\Column(name="last_buy_date", type="datetimetz", nullable=true) |
||
| 199 | */ |
||
| 200 | private $last_buy_date; |
||
| 201 | |||
| 202 | /** |
||
| 203 | * @var string|null |
||
| 204 | * |
||
| 205 | * @ORM\Column(name="buy_times", type="decimal", precision=10, scale=0, nullable=true, options={"unsigned":true,"default":0}) |
||
| 206 | */ |
||
| 207 | private $buy_times = 0; |
||
| 208 | |||
| 209 | /** |
||
| 210 | * @var string|null |
||
| 211 | * |
||
| 212 | * @ORM\Column(name="buy_total", type="decimal", precision=12, scale=2, nullable=true, options={"unsigned":true,"default":0}) |
||
| 213 | */ |
||
| 214 | private $buy_total = 0; |
||
| 215 | |||
| 216 | /** |
||
| 217 | * @var string|null |
||
| 218 | * |
||
| 219 | * @ORM\Column(name="note", type="string", length=4000, nullable=true) |
||
| 220 | */ |
||
| 221 | private $note; |
||
| 222 | |||
| 223 | /** |
||
| 224 | * @var string|null |
||
| 225 | * |
||
| 226 | * @ORM\Column(name="reset_key", type="string", length=255, nullable=true) |
||
| 227 | */ |
||
| 228 | private $reset_key; |
||
| 229 | |||
| 230 | /** |
||
| 231 | * @var \DateTime|null |
||
| 232 | * |
||
| 233 | * @ORM\Column(name="reset_expire", type="datetimetz", nullable=true) |
||
| 234 | */ |
||
| 235 | private $reset_expire; |
||
| 236 | |||
| 237 | /** |
||
| 238 | * @var string |
||
| 239 | * |
||
| 240 | * @ORM\Column(name="point", type="decimal", precision=12, scale=0, options={"unsigned":false,"default":0}) |
||
| 241 | */ |
||
| 242 | private $point = '0'; |
||
| 243 | |||
| 244 | /** |
||
| 245 | * @var \DateTime |
||
| 246 | * |
||
| 247 | * @ORM\Column(name="create_date", type="datetimetz") |
||
| 248 | */ |
||
| 249 | private $create_date; |
||
| 250 | |||
| 251 | /** |
||
| 252 | * @var \DateTime |
||
| 253 | * |
||
| 254 | * @ORM\Column(name="update_date", type="datetimetz") |
||
| 255 | */ |
||
| 256 | private $update_date; |
||
| 257 | |||
| 258 | /** |
||
| 259 | * @var \Doctrine\Common\Collections\Collection |
||
| 260 | * |
||
| 261 | * @ORM\OneToMany(targetEntity="Eccube\Entity\CustomerFavoriteProduct", mappedBy="Customer", cascade={"remove"}) |
||
| 262 | */ |
||
| 263 | private $CustomerFavoriteProducts; |
||
| 264 | |||
| 265 | /** |
||
| 266 | * @var \Doctrine\Common\Collections\Collection |
||
| 267 | * |
||
| 268 | * @ORM\OneToMany(targetEntity="Eccube\Entity\CustomerAddress", mappedBy="Customer", cascade={"remove"}) |
||
| 269 | * @ORM\OrderBy({ |
||
| 270 | * "id"="ASC" |
||
| 271 | * }) |
||
| 272 | */ |
||
| 273 | private $CustomerAddresses; |
||
| 274 | |||
| 275 | /** |
||
| 276 | * @var \Doctrine\Common\Collections\Collection |
||
| 277 | * |
||
| 278 | * @ORM\OneToMany(targetEntity="Eccube\Entity\Order", mappedBy="Customer") |
||
| 279 | */ |
||
| 280 | private $Orders; |
||
| 281 | |||
| 282 | /** |
||
| 283 | * @var \Eccube\Entity\Master\CustomerStatus |
||
| 284 | * |
||
| 285 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\CustomerStatus") |
||
| 286 | * @ORM\JoinColumns({ |
||
| 287 | * @ORM\JoinColumn(name="customer_status_id", referencedColumnName="id") |
||
| 288 | * }) |
||
| 289 | */ |
||
| 290 | private $Status; |
||
| 291 | |||
| 292 | /** |
||
| 293 | * @var \Eccube\Entity\Master\Sex |
||
| 294 | * |
||
| 295 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Sex") |
||
| 296 | * @ORM\JoinColumns({ |
||
| 297 | * @ORM\JoinColumn(name="sex_id", referencedColumnName="id") |
||
| 298 | * }) |
||
| 299 | */ |
||
| 300 | private $Sex; |
||
| 301 | |||
| 302 | /** |
||
| 303 | * @var \Eccube\Entity\Master\Job |
||
| 304 | * |
||
| 305 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Job") |
||
| 306 | * @ORM\JoinColumns({ |
||
| 307 | * @ORM\JoinColumn(name="job_id", referencedColumnName="id") |
||
| 308 | * }) |
||
| 309 | */ |
||
| 310 | private $Job; |
||
| 311 | |||
| 312 | /** |
||
| 313 | * @var \Eccube\Entity\Master\Country |
||
| 314 | * |
||
| 315 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Country") |
||
| 316 | * @ORM\JoinColumns({ |
||
| 317 | * @ORM\JoinColumn(name="country_id", referencedColumnName="id") |
||
| 318 | * }) |
||
| 319 | */ |
||
| 320 | private $Country; |
||
| 321 | |||
| 322 | /** |
||
| 323 | * @var \Eccube\Entity\Master\Pref |
||
| 324 | * |
||
| 325 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Pref") |
||
| 326 | * @ORM\JoinColumns({ |
||
| 327 | * @ORM\JoinColumn(name="pref_id", referencedColumnName="id") |
||
| 328 | * }) |
||
| 329 | */ |
||
| 330 | private $Pref; |
||
| 331 | |||
| 332 | /** |
||
| 333 | * Constructor |
||
| 334 | */ |
||
| 335 | 343 | public function __construct() |
|
| 344 | |||
| 345 | /** |
||
| 346 | * @return string |
||
| 347 | */ |
||
| 348 | public function __toString() |
||
| 352 | |||
| 353 | /** |
||
| 354 | * {@inheritdoc} |
||
| 355 | */ |
||
| 356 | 2 | public function getRoles() |
|
| 360 | |||
| 361 | /** |
||
| 362 | * {@inheritdoc} |
||
| 363 | */ |
||
| 364 | 76 | public function getUsername() |
|
| 368 | |||
| 369 | /** |
||
| 370 | * {@inheritdoc} |
||
| 371 | */ |
||
| 372 | public function eraseCredentials() |
||
| 375 | |||
| 376 | // TODO: できればFormTypeで行いたい |
||
| 377 | 49 | public static function loadValidatorMetadata(ClassMetadata $metadata) |
|
| 385 | |||
| 386 | /** |
||
| 387 | * Get id. |
||
| 388 | * |
||
| 389 | * @return int |
||
| 390 | */ |
||
| 391 | 124 | public function getId() |
|
| 395 | |||
| 396 | /** |
||
| 397 | * Set name01. |
||
| 398 | * |
||
| 399 | * @param string $name01 |
||
| 400 | * |
||
| 401 | * @return Customer |
||
| 402 | */ |
||
| 403 | 339 | public function setName01($name01) |
|
| 409 | |||
| 410 | /** |
||
| 411 | * Get name01. |
||
| 412 | * |
||
| 413 | * @return string |
||
| 414 | */ |
||
| 415 | 140 | public function getName01() |
|
| 419 | |||
| 420 | /** |
||
| 421 | * Set name02. |
||
| 422 | * |
||
| 423 | * @param string $name02 |
||
| 424 | * |
||
| 425 | * @return Customer |
||
| 426 | */ |
||
| 427 | 339 | public function setName02($name02) |
|
| 433 | |||
| 434 | /** |
||
| 435 | * Get name02. |
||
| 436 | * |
||
| 437 | * @return string |
||
| 438 | */ |
||
| 439 | 137 | public function getName02() |
|
| 443 | |||
| 444 | /** |
||
| 445 | * Set kana01. |
||
| 446 | * |
||
| 447 | * @param string|null $kana01 |
||
| 448 | * |
||
| 449 | * @return Customer |
||
| 450 | */ |
||
| 451 | 339 | public function setKana01($kana01 = null) |
|
| 457 | |||
| 458 | /** |
||
| 459 | * Get kana01. |
||
| 460 | * |
||
| 461 | * @return string|null |
||
| 462 | */ |
||
| 463 | 114 | public function getKana01() |
|
| 467 | |||
| 468 | /** |
||
| 469 | * Set kana02. |
||
| 470 | * |
||
| 471 | * @param string|null $kana02 |
||
| 472 | * |
||
| 473 | * @return Customer |
||
| 474 | */ |
||
| 475 | 339 | public function setKana02($kana02 = null) |
|
| 481 | |||
| 482 | /** |
||
| 483 | * Get kana02. |
||
| 484 | * |
||
| 485 | * @return string|null |
||
| 486 | */ |
||
| 487 | 115 | public function getKana02() |
|
| 491 | |||
| 492 | /** |
||
| 493 | * Set companyName. |
||
| 494 | * |
||
| 495 | * @param string|null $companyName |
||
| 496 | * |
||
| 497 | * @return Customer |
||
| 498 | */ |
||
| 499 | 324 | public function setCompanyName($companyName = null) |
|
| 505 | |||
| 506 | /** |
||
| 507 | * Get companyName. |
||
| 508 | * |
||
| 509 | * @return string|null |
||
| 510 | */ |
||
| 511 | 109 | public function getCompanyName() |
|
| 515 | |||
| 516 | /** |
||
| 517 | * Set zip01. |
||
| 518 | * |
||
| 519 | * @param string|null $zip01 |
||
| 520 | * |
||
| 521 | * @return Customer |
||
| 522 | */ |
||
| 523 | 339 | public function setZip01($zip01 = null) |
|
| 529 | |||
| 530 | /** |
||
| 531 | * Get zip01. |
||
| 532 | * |
||
| 533 | * @return string|null |
||
| 534 | */ |
||
| 535 | 110 | public function getZip01() |
|
| 539 | |||
| 540 | /** |
||
| 541 | * Set zip02. |
||
| 542 | * |
||
| 543 | * @param string|null $zip02 |
||
| 544 | * |
||
| 545 | * @return Customer |
||
| 546 | */ |
||
| 547 | 339 | public function setZip02($zip02 = null) |
|
| 553 | |||
| 554 | /** |
||
| 555 | * Get zip02. |
||
| 556 | * |
||
| 557 | * @return string|null |
||
| 558 | */ |
||
| 559 | 110 | public function getZip02() |
|
| 563 | |||
| 564 | /** |
||
| 565 | * Set zipcode. |
||
| 566 | * |
||
| 567 | * @param string|null $zipcode |
||
| 568 | * |
||
| 569 | * @return Customer |
||
| 570 | */ |
||
| 571 | 297 | public function setZipcode($zipcode = null) |
|
| 577 | |||
| 578 | /** |
||
| 579 | * Get zipcode. |
||
| 580 | * |
||
| 581 | * @return string|null |
||
| 582 | */ |
||
| 583 | public function getZipcode() |
||
| 587 | |||
| 588 | /** |
||
| 589 | * Set addr01. |
||
| 590 | * |
||
| 591 | * @param string|null $addr01 |
||
| 592 | * |
||
| 593 | * @return Customer |
||
| 594 | */ |
||
| 595 | 339 | public function setAddr01($addr01 = null) |
|
| 601 | |||
| 602 | /** |
||
| 603 | * Get addr01. |
||
| 604 | * |
||
| 605 | * @return string|null |
||
| 606 | */ |
||
| 607 | 110 | public function getAddr01() |
|
| 611 | |||
| 612 | /** |
||
| 613 | * Set addr02. |
||
| 614 | * |
||
| 615 | * @param string|null $addr02 |
||
| 616 | * |
||
| 617 | * @return Customer |
||
| 618 | */ |
||
| 619 | 339 | public function setAddr02($addr02 = null) |
|
| 625 | |||
| 626 | /** |
||
| 627 | * Get addr02. |
||
| 628 | * |
||
| 629 | * @return string|null |
||
| 630 | */ |
||
| 631 | 110 | public function getAddr02() |
|
| 635 | |||
| 636 | /** |
||
| 637 | * Set email. |
||
| 638 | * |
||
| 639 | * @param string $email |
||
| 640 | * |
||
| 641 | * @return Customer |
||
| 642 | */ |
||
| 643 | 339 | public function setEmail($email) |
|
| 649 | |||
| 650 | /** |
||
| 651 | * Get email. |
||
| 652 | * |
||
| 653 | * @return string |
||
| 654 | */ |
||
| 655 | 79 | public function getEmail() |
|
| 659 | |||
| 660 | /** |
||
| 661 | * Set tel01. |
||
| 662 | * |
||
| 663 | * @param string|null $tel01 |
||
| 664 | * |
||
| 665 | * @return Customer |
||
| 666 | */ |
||
| 667 | 339 | public function setTel01($tel01 = null) |
|
| 673 | |||
| 674 | /** |
||
| 675 | * Get tel01. |
||
| 676 | * |
||
| 677 | * @return string|null |
||
| 678 | */ |
||
| 679 | 119 | public function getTel01() |
|
| 683 | |||
| 684 | /** |
||
| 685 | * Set tel02. |
||
| 686 | * |
||
| 687 | * @param string|null $tel02 |
||
| 688 | * |
||
| 689 | * @return Customer |
||
| 690 | */ |
||
| 691 | 339 | public function setTel02($tel02 = null) |
|
| 697 | |||
| 698 | /** |
||
| 699 | * Get tel02. |
||
| 700 | * |
||
| 701 | * @return string|null |
||
| 702 | */ |
||
| 703 | 119 | public function getTel02() |
|
| 707 | |||
| 708 | /** |
||
| 709 | * Set tel03. |
||
| 710 | * |
||
| 711 | * @param string|null $tel03 |
||
| 712 | * |
||
| 713 | * @return Customer |
||
| 714 | */ |
||
| 715 | 339 | public function setTel03($tel03 = null) |
|
| 721 | |||
| 722 | /** |
||
| 723 | * Get tel03. |
||
| 724 | * |
||
| 725 | * @return string|null |
||
| 726 | */ |
||
| 727 | 119 | public function getTel03() |
|
| 731 | |||
| 732 | /** |
||
| 733 | * Set fax01. |
||
| 734 | * |
||
| 735 | * @param string|null $fax01 |
||
| 736 | * |
||
| 737 | * @return Customer |
||
| 738 | */ |
||
| 739 | 322 | public function setFax01($fax01 = null) |
|
| 745 | |||
| 746 | /** |
||
| 747 | * Get fax01. |
||
| 748 | * |
||
| 749 | * @return string|null |
||
| 750 | */ |
||
| 751 | 109 | public function getFax01() |
|
| 755 | |||
| 756 | /** |
||
| 757 | * Set fax02. |
||
| 758 | * |
||
| 759 | * @param string|null $fax02 |
||
| 760 | * |
||
| 761 | * @return Customer |
||
| 762 | */ |
||
| 763 | 322 | public function setFax02($fax02 = null) |
|
| 769 | |||
| 770 | /** |
||
| 771 | * Get fax02. |
||
| 772 | * |
||
| 773 | * @return string|null |
||
| 774 | */ |
||
| 775 | 109 | public function getFax02() |
|
| 779 | |||
| 780 | /** |
||
| 781 | * Set fax03. |
||
| 782 | * |
||
| 783 | * @param string|null $fax03 |
||
| 784 | * |
||
| 785 | * @return Customer |
||
| 786 | */ |
||
| 787 | 322 | public function setFax03($fax03 = null) |
|
| 793 | |||
| 794 | /** |
||
| 795 | * Get fax03. |
||
| 796 | * |
||
| 797 | * @return string|null |
||
| 798 | */ |
||
| 799 | 109 | public function getFax03() |
|
| 803 | |||
| 804 | /** |
||
| 805 | * Set birth. |
||
| 806 | * |
||
| 807 | * @param \DateTime|null $birth |
||
| 808 | * |
||
| 809 | * @return Customer |
||
| 810 | */ |
||
| 811 | 325 | public function setBirth($birth = null) |
|
| 817 | |||
| 818 | /** |
||
| 819 | * Get birth. |
||
| 820 | * |
||
| 821 | * @return \DateTime|null |
||
| 822 | */ |
||
| 823 | 62 | public function getBirth() |
|
| 827 | |||
| 828 | /** |
||
| 829 | * Set password. |
||
| 830 | * |
||
| 831 | * @param string|null $password |
||
| 832 | * |
||
| 833 | * @return Customer |
||
| 834 | */ |
||
| 835 | 321 | public function setPassword($password = null) |
|
| 841 | |||
| 842 | /** |
||
| 843 | * Get password. |
||
| 844 | * |
||
| 845 | * @return string|null |
||
| 846 | */ |
||
| 847 | 125 | public function getPassword() |
|
| 851 | |||
| 852 | /** |
||
| 853 | * Set salt. |
||
| 854 | * |
||
| 855 | * @param string|null $salt |
||
| 856 | * |
||
| 857 | * @return Customer |
||
| 858 | */ |
||
| 859 | 281 | public function setSalt($salt = null) |
|
| 865 | |||
| 866 | /** |
||
| 867 | * Get salt. |
||
| 868 | * |
||
| 869 | * @return string|null |
||
| 870 | */ |
||
| 871 | 77 | public function getSalt() |
|
| 875 | |||
| 876 | /** |
||
| 877 | * Set secretKey. |
||
| 878 | * |
||
| 879 | * @param string $secretKey |
||
| 880 | * |
||
| 881 | * @return Customer |
||
| 882 | */ |
||
| 883 | 281 | public function setSecretKey($secretKey) |
|
| 889 | |||
| 890 | /** |
||
| 891 | * Get secretKey. |
||
| 892 | * |
||
| 893 | * @return string |
||
| 894 | */ |
||
| 895 | 5 | public function getSecretKey() |
|
| 899 | |||
| 900 | /** |
||
| 901 | * Set firstBuyDate. |
||
| 902 | * |
||
| 903 | * @param \DateTime|null $firstBuyDate |
||
| 904 | * |
||
| 905 | * @return Customer |
||
| 906 | */ |
||
| 907 | 4 | public function setFirstBuyDate($firstBuyDate = null) |
|
| 913 | |||
| 914 | /** |
||
| 915 | * Get firstBuyDate. |
||
| 916 | * |
||
| 917 | * @return \DateTime|null |
||
| 918 | */ |
||
| 919 | 5 | public function getFirstBuyDate() |
|
| 923 | |||
| 924 | /** |
||
| 925 | * Set lastBuyDate. |
||
| 926 | * |
||
| 927 | * @param \DateTime|null $lastBuyDate |
||
| 928 | * |
||
| 929 | * @return Customer |
||
| 930 | */ |
||
| 931 | 6 | public function setLastBuyDate($lastBuyDate = null) |
|
| 937 | |||
| 938 | /** |
||
| 939 | * Get lastBuyDate. |
||
| 940 | * |
||
| 941 | * @return \DateTime|null |
||
| 942 | */ |
||
| 943 | 2 | public function getLastBuyDate() |
|
| 947 | |||
| 948 | /** |
||
| 949 | * Set buyTimes. |
||
| 950 | * |
||
| 951 | * @param string|null $buyTimes |
||
| 952 | * |
||
| 953 | * @return Customer |
||
| 954 | */ |
||
| 955 | 343 | public function setBuyTimes($buyTimes = null) |
|
| 961 | |||
| 962 | /** |
||
| 963 | * Get buyTimes. |
||
| 964 | * |
||
| 965 | * @return string|null |
||
| 966 | */ |
||
| 967 | 5 | public function getBuyTimes() |
|
| 971 | |||
| 972 | /** |
||
| 973 | * Set buyTotal. |
||
| 974 | * |
||
| 975 | * @param string|null $buyTotal |
||
| 976 | * |
||
| 977 | * @return Customer |
||
| 978 | */ |
||
| 979 | 343 | public function setBuyTotal($buyTotal = null) |
|
| 985 | |||
| 986 | /** |
||
| 987 | * Get buyTotal. |
||
| 988 | * |
||
| 989 | * @return string|null |
||
| 990 | */ |
||
| 991 | 3 | public function getBuyTotal() |
|
| 995 | |||
| 996 | /** |
||
| 997 | * Set note. |
||
| 998 | * |
||
| 999 | * @param string|null $note |
||
| 1000 | * |
||
| 1001 | * @return Customer |
||
| 1002 | */ |
||
| 1003 | 24 | public function setNote($note = null) |
|
| 1009 | |||
| 1010 | /** |
||
| 1011 | * Get note. |
||
| 1012 | * |
||
| 1013 | * @return string|null |
||
| 1014 | */ |
||
| 1015 | 32 | public function getNote() |
|
| 1019 | |||
| 1020 | /** |
||
| 1021 | * Set resetKey. |
||
| 1022 | * |
||
| 1023 | * @param string|null $resetKey |
||
| 1024 | * |
||
| 1025 | * @return Customer |
||
| 1026 | */ |
||
| 1027 | 2 | public function setResetKey($resetKey = null) |
|
| 1033 | |||
| 1034 | /** |
||
| 1035 | * Get resetKey. |
||
| 1036 | * |
||
| 1037 | * @return string|null |
||
| 1038 | */ |
||
| 1039 | public function getResetKey() |
||
| 1043 | |||
| 1044 | /** |
||
| 1045 | * Set resetExpire. |
||
| 1046 | * |
||
| 1047 | * @param \DateTime|null $resetExpire |
||
| 1048 | * |
||
| 1049 | * @return Customer |
||
| 1050 | */ |
||
| 1051 | 2 | public function setResetExpire($resetExpire = null) |
|
| 1057 | |||
| 1058 | /** |
||
| 1059 | * Get resetExpire. |
||
| 1060 | * |
||
| 1061 | * @return \DateTime|null |
||
| 1062 | */ |
||
| 1063 | public function getResetExpire() |
||
| 1067 | |||
| 1068 | /** |
||
| 1069 | * Set createDate. |
||
| 1070 | * |
||
| 1071 | * @param \DateTime $createDate |
||
| 1072 | * |
||
| 1073 | * @return Customer |
||
| 1074 | */ |
||
| 1075 | 281 | public function setCreateDate($createDate) |
|
| 1081 | |||
| 1082 | /** |
||
| 1083 | * Get createDate. |
||
| 1084 | * |
||
| 1085 | * @return \DateTime |
||
| 1086 | */ |
||
| 1087 | 1 | public function getCreateDate() |
|
| 1091 | |||
| 1092 | /** |
||
| 1093 | * Set updateDate. |
||
| 1094 | * |
||
| 1095 | * @param \DateTime $updateDate |
||
| 1096 | * |
||
| 1097 | * @return Customer |
||
| 1098 | */ |
||
| 1099 | 281 | public function setUpdateDate($updateDate) |
|
| 1105 | |||
| 1106 | /** |
||
| 1107 | * Get updateDate. |
||
| 1108 | * |
||
| 1109 | * @return \DateTime |
||
| 1110 | */ |
||
| 1111 | 1 | public function getUpdateDate() |
|
| 1115 | |||
| 1116 | /** |
||
| 1117 | * Add customerFavoriteProduct. |
||
| 1118 | * |
||
| 1119 | * @param \Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct |
||
| 1120 | * |
||
| 1121 | * @return Customer |
||
| 1122 | */ |
||
| 1123 | public function addCustomerFavoriteProduct(\Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct) |
||
| 1129 | |||
| 1130 | /** |
||
| 1131 | * Remove customerFavoriteProduct. |
||
| 1132 | * |
||
| 1133 | * @param \Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct |
||
| 1134 | * |
||
| 1135 | * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. |
||
| 1136 | */ |
||
| 1137 | public function removeCustomerFavoriteProduct(\Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct) |
||
| 1141 | |||
| 1142 | /** |
||
| 1143 | * Get customerFavoriteProducts. |
||
| 1144 | * |
||
| 1145 | * @return \Doctrine\Common\Collections\Collection |
||
| 1146 | */ |
||
| 1147 | public function getCustomerFavoriteProducts() |
||
| 1151 | |||
| 1152 | /** |
||
| 1153 | * Add customerAddress. |
||
| 1154 | * |
||
| 1155 | * @param \Eccube\Entity\CustomerAddress $customerAddress |
||
| 1156 | * |
||
| 1157 | * @return Customer |
||
| 1158 | */ |
||
| 1159 | 7 | public function addCustomerAddress(\Eccube\Entity\CustomerAddress $customerAddress) |
|
| 1165 | |||
| 1166 | /** |
||
| 1167 | * Remove customerAddress. |
||
| 1168 | * |
||
| 1169 | * @param \Eccube\Entity\CustomerAddress $customerAddress |
||
| 1170 | * |
||
| 1171 | * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. |
||
| 1172 | */ |
||
| 1173 | public function removeCustomerAddress(\Eccube\Entity\CustomerAddress $customerAddress) |
||
| 1177 | |||
| 1178 | /** |
||
| 1179 | * Get customerAddresses. |
||
| 1180 | * |
||
| 1181 | * @return \Doctrine\Common\Collections\Collection |
||
| 1182 | */ |
||
| 1183 | 20 | public function getCustomerAddresses() |
|
| 1187 | |||
| 1188 | /** |
||
| 1189 | * Add order. |
||
| 1190 | * |
||
| 1191 | * @param \Eccube\Entity\Order $order |
||
| 1192 | * |
||
| 1193 | * @return Customer |
||
| 1194 | */ |
||
| 1195 | 1 | public function addOrder(\Eccube\Entity\Order $order) |
|
| 1201 | |||
| 1202 | /** |
||
| 1203 | * Remove order. |
||
| 1204 | * |
||
| 1205 | * @param \Eccube\Entity\Order $order |
||
| 1206 | * |
||
| 1207 | * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. |
||
| 1208 | */ |
||
| 1209 | public function removeOrder(\Eccube\Entity\Order $order) |
||
| 1213 | |||
| 1214 | /** |
||
| 1215 | * Get orders. |
||
| 1216 | * |
||
| 1217 | * @return \Doctrine\Common\Collections\Collection |
||
| 1218 | */ |
||
| 1219 | 3 | public function getOrders() |
|
| 1223 | |||
| 1224 | /** |
||
| 1225 | * Set status. |
||
| 1226 | * |
||
| 1227 | * @param \Eccube\Entity\Master\CustomerStatus|null $status |
||
| 1228 | * |
||
| 1229 | * @return Customer |
||
| 1230 | */ |
||
| 1231 | 309 | public function setStatus(\Eccube\Entity\Master\CustomerStatus $status = null) |
|
| 1237 | |||
| 1238 | /** |
||
| 1239 | * Get status. |
||
| 1240 | * |
||
| 1241 | * @return \Eccube\Entity\Master\CustomerStatus|null |
||
| 1242 | */ |
||
| 1243 | 40 | public function getStatus() |
|
| 1247 | |||
| 1248 | /** |
||
| 1249 | * Set sex. |
||
| 1250 | * |
||
| 1251 | * @param \Eccube\Entity\Master\Sex|null $sex |
||
| 1252 | * |
||
| 1253 | * @return Customer |
||
| 1254 | */ |
||
| 1255 | 323 | public function setSex(\Eccube\Entity\Master\Sex $sex = null) |
|
| 1261 | |||
| 1262 | /** |
||
| 1263 | * Get sex. |
||
| 1264 | * |
||
| 1265 | * @return \Eccube\Entity\Master\Sex|null |
||
| 1266 | */ |
||
| 1267 | 62 | public function getSex() |
|
| 1271 | |||
| 1272 | /** |
||
| 1273 | * Set job. |
||
| 1274 | * |
||
| 1275 | * @param \Eccube\Entity\Master\Job|null $job |
||
| 1276 | * |
||
| 1277 | * @return Customer |
||
| 1278 | */ |
||
| 1279 | 323 | public function setJob(\Eccube\Entity\Master\Job $job = null) |
|
| 1285 | |||
| 1286 | /** |
||
| 1287 | * Get job. |
||
| 1288 | * |
||
| 1289 | * @return \Eccube\Entity\Master\Job|null |
||
| 1290 | */ |
||
| 1291 | 62 | public function getJob() |
|
| 1295 | |||
| 1296 | /** |
||
| 1297 | * Set country. |
||
| 1298 | * |
||
| 1299 | * @param \Eccube\Entity\Master\Country|null $country |
||
| 1300 | * |
||
| 1301 | * @return Customer |
||
| 1302 | */ |
||
| 1303 | public function setCountry(\Eccube\Entity\Master\Country $country = null) |
||
| 1309 | |||
| 1310 | /** |
||
| 1311 | * Get country. |
||
| 1312 | * |
||
| 1313 | * @return \Eccube\Entity\Master\Country|null |
||
| 1314 | */ |
||
| 1315 | 52 | public function getCountry() |
|
| 1319 | |||
| 1320 | /** |
||
| 1321 | * Set pref. |
||
| 1322 | * |
||
| 1323 | * @param \Eccube\Entity\Master\Pref|null $pref |
||
| 1324 | * |
||
| 1325 | * @return Customer |
||
| 1326 | */ |
||
| 1327 | 339 | public function setPref(\Eccube\Entity\Master\Pref $pref = null) |
|
| 1333 | |||
| 1334 | /** |
||
| 1335 | * Get pref. |
||
| 1336 | * |
||
| 1337 | * @return \Eccube\Entity\Master\Pref|null |
||
| 1338 | */ |
||
| 1339 | 129 | public function getPref() |
|
| 1343 | |||
| 1344 | /** |
||
| 1345 | * Set point |
||
| 1346 | * |
||
| 1347 | * @param string $point |
||
| 1348 | * |
||
| 1349 | * @return Customer |
||
| 1350 | */ |
||
| 1351 | 306 | public function setPoint($point) |
|
| 1357 | |||
| 1358 | /** |
||
| 1359 | * Get point |
||
| 1360 | * |
||
| 1361 | * @return string |
||
| 1362 | */ |
||
| 1363 | 75 | public function getPoint() |
|
| 1367 | } |
||
| 1368 |