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 |
||
| 29 | class Order extends \Eccube\Entity\AbstractEntity implements PurchaseInterface, ItemHolderInterface |
||
| 30 | { |
||
| 31 | use PointTrait; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * isMultiple |
||
| 35 | * |
||
| 36 | * @return boolean |
||
| 37 | */ |
||
| 38 | 50 | public function isMultiple() |
|
| 42 | |||
| 43 | /** |
||
| 44 | * 対象となるお届け先情報を取得 |
||
| 45 | * |
||
| 46 | * @param integer $shippingId |
||
| 47 | * |
||
| 48 | * @return \Eccube\Entity\Shipping|null |
||
| 49 | */ |
||
| 50 | public function findShipping($shippingId) |
||
| 60 | |||
| 61 | /** |
||
| 62 | * この注文の保持する販売種別を取得します. |
||
| 63 | * |
||
| 64 | * @return \Eccube\Entity\Master\SaleType[] 一意な販売種別の配列 |
||
| 65 | */ |
||
| 66 | 1 | public function getSaleTypes() |
|
| 79 | |||
| 80 | /** |
||
| 81 | * 合計金額を計算 |
||
| 82 | * |
||
| 83 | * @return string |
||
| 84 | * |
||
| 85 | * @deprecated |
||
| 86 | */ |
||
| 87 | 1 | public function getTotalPrice() |
|
| 94 | |||
| 95 | /** |
||
| 96 | * @var integer |
||
| 97 | * |
||
| 98 | * @ORM\Column(name="id", type="integer", options={"unsigned":true}) |
||
| 99 | * @ORM\Id |
||
| 100 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
| 101 | */ |
||
| 102 | private $id; |
||
| 103 | |||
| 104 | /** |
||
| 105 | * @var string|null |
||
| 106 | * |
||
| 107 | * @ORM\Column(name="pre_order_id", type="string", length=255, nullable=true) |
||
| 108 | */ |
||
| 109 | private $pre_order_id; |
||
| 110 | |||
| 111 | /** |
||
| 112 | * @var string|null |
||
| 113 | * |
||
| 114 | * @ORM\Column(name="order_code", type="string", length=255, nullable=true) |
||
| 115 | */ |
||
| 116 | private $order_code; |
||
| 117 | |||
| 118 | /** |
||
| 119 | * @var string|null |
||
| 120 | * |
||
| 121 | * @ORM\Column(name="message", type="string", length=4000, nullable=true) |
||
| 122 | */ |
||
| 123 | private $message; |
||
| 124 | |||
| 125 | /** |
||
| 126 | * @var string|null |
||
| 127 | * |
||
| 128 | * @ORM\Column(name="name01", type="string", length=255, nullable=true) |
||
| 129 | */ |
||
| 130 | private $name01; |
||
| 131 | |||
| 132 | /** |
||
| 133 | * @var string|null |
||
| 134 | * |
||
| 135 | * @ORM\Column(name="name02", type="string", length=255, nullable=true) |
||
| 136 | */ |
||
| 137 | private $name02; |
||
| 138 | |||
| 139 | /** |
||
| 140 | * @var string|null |
||
| 141 | * |
||
| 142 | * @ORM\Column(name="kana01", type="string", length=255, nullable=true) |
||
| 143 | */ |
||
| 144 | private $kana01; |
||
| 145 | |||
| 146 | /** |
||
| 147 | * @var string|null |
||
| 148 | * |
||
| 149 | * @ORM\Column(name="kana02", type="string", length=255, nullable=true) |
||
| 150 | */ |
||
| 151 | private $kana02; |
||
| 152 | |||
| 153 | /** |
||
| 154 | * @var string|null |
||
| 155 | * |
||
| 156 | * @ORM\Column(name="company_name", type="string", length=255, nullable=true) |
||
| 157 | */ |
||
| 158 | private $company_name; |
||
| 159 | |||
| 160 | /** |
||
| 161 | * @var string|null |
||
| 162 | * |
||
| 163 | * @ORM\Column(name="email", type="string", length=255, nullable=true) |
||
| 164 | */ |
||
| 165 | private $email; |
||
| 166 | |||
| 167 | /** |
||
| 168 | * @var string|null |
||
| 169 | * |
||
| 170 | * @ORM\Column(name="tel01", type="string", length=5, nullable=true) |
||
| 171 | */ |
||
| 172 | private $tel01; |
||
| 173 | |||
| 174 | /** |
||
| 175 | * @var string|null |
||
| 176 | * |
||
| 177 | * @ORM\Column(name="tel02", type="string", length=4, nullable=true) |
||
| 178 | */ |
||
| 179 | private $tel02; |
||
| 180 | |||
| 181 | /** |
||
| 182 | * @var string|null |
||
| 183 | * |
||
| 184 | * @ORM\Column(name="tel03", type="string", length=4, nullable=true) |
||
| 185 | */ |
||
| 186 | private $tel03; |
||
| 187 | |||
| 188 | /** |
||
| 189 | * @var string|null |
||
| 190 | * |
||
| 191 | * @ORM\Column(name="fax01", type="string", length=5, nullable=true) |
||
| 192 | */ |
||
| 193 | private $fax01; |
||
| 194 | |||
| 195 | /** |
||
| 196 | * @var string|null |
||
| 197 | * |
||
| 198 | * @ORM\Column(name="fax02", type="string", length=4, nullable=true) |
||
| 199 | */ |
||
| 200 | private $fax02; |
||
| 201 | |||
| 202 | /** |
||
| 203 | * @var string|null |
||
| 204 | * |
||
| 205 | * @ORM\Column(name="fax03", type="string", length=4, nullable=true) |
||
| 206 | */ |
||
| 207 | private $fax03; |
||
| 208 | |||
| 209 | /** |
||
| 210 | * @var string|null |
||
| 211 | * |
||
| 212 | * @ORM\Column(name="zip01", type="string", length=3, nullable=true) |
||
| 213 | */ |
||
| 214 | private $zip01; |
||
| 215 | |||
| 216 | /** |
||
| 217 | * @var string|null |
||
| 218 | * |
||
| 219 | * @ORM\Column(name="zip02", type="string", length=4, nullable=true) |
||
| 220 | */ |
||
| 221 | private $zip02; |
||
| 222 | |||
| 223 | /** |
||
| 224 | * @var string|null |
||
| 225 | * |
||
| 226 | * @ORM\Column(name="zipcode", type="string", length=7, nullable=true) |
||
| 227 | */ |
||
| 228 | private $zipcode; |
||
| 229 | |||
| 230 | /** |
||
| 231 | * @var string|null |
||
| 232 | * |
||
| 233 | * @ORM\Column(name="addr01", type="string", length=255, nullable=true) |
||
| 234 | */ |
||
| 235 | private $addr01; |
||
| 236 | |||
| 237 | /** |
||
| 238 | * @var string|null |
||
| 239 | * |
||
| 240 | * @ORM\Column(name="addr02", type="string", length=255, nullable=true) |
||
| 241 | */ |
||
| 242 | private $addr02; |
||
| 243 | |||
| 244 | /** |
||
| 245 | * @var \DateTime|null |
||
| 246 | * |
||
| 247 | * @ORM\Column(name="birth", type="datetimetz", nullable=true) |
||
| 248 | */ |
||
| 249 | private $birth; |
||
| 250 | |||
| 251 | /** |
||
| 252 | * @var string |
||
| 253 | * |
||
| 254 | * @ORM\Column(name="subtotal", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
| 255 | */ |
||
| 256 | private $subtotal = 0; |
||
| 257 | |||
| 258 | /** |
||
| 259 | * @var string |
||
| 260 | * |
||
| 261 | * @ORM\Column(name="discount", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
| 262 | */ |
||
| 263 | private $discount = 0; |
||
| 264 | |||
| 265 | /** |
||
| 266 | * @var string |
||
| 267 | * |
||
| 268 | * @ORM\Column(name="delivery_fee_total", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
| 269 | */ |
||
| 270 | private $delivery_fee_total = 0; |
||
| 271 | |||
| 272 | /** |
||
| 273 | * @var string |
||
| 274 | * |
||
| 275 | * @ORM\Column(name="charge", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
| 276 | */ |
||
| 277 | private $charge = 0; |
||
| 278 | |||
| 279 | /** |
||
| 280 | * @var string |
||
| 281 | * |
||
| 282 | * @ORM\Column(name="tax", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
| 283 | */ |
||
| 284 | private $tax = 0; |
||
| 285 | |||
| 286 | /** |
||
| 287 | * @var string |
||
| 288 | * |
||
| 289 | * @ORM\Column(name="total", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
| 290 | */ |
||
| 291 | private $total = 0; |
||
| 292 | |||
| 293 | /** |
||
| 294 | * @var string |
||
| 295 | * |
||
| 296 | * @ORM\Column(name="payment_total", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
| 297 | */ |
||
| 298 | private $payment_total = 0; |
||
| 299 | |||
| 300 | /** |
||
| 301 | * @var string|null |
||
| 302 | * |
||
| 303 | * @ORM\Column(name="payment_method", type="string", length=255, nullable=true) |
||
| 304 | */ |
||
| 305 | private $payment_method; |
||
| 306 | |||
| 307 | /** |
||
| 308 | * @var string|null |
||
| 309 | * |
||
| 310 | * @ORM\Column(name="note", type="string", length=4000, nullable=true) |
||
| 311 | */ |
||
| 312 | private $note; |
||
| 313 | |||
| 314 | /** |
||
| 315 | * @var \DateTime |
||
| 316 | * |
||
| 317 | * @ORM\Column(name="create_date", type="datetimetz") |
||
| 318 | */ |
||
| 319 | private $create_date; |
||
| 320 | |||
| 321 | /** |
||
| 322 | * @var \DateTime |
||
| 323 | * |
||
| 324 | * @ORM\Column(name="update_date", type="datetimetz") |
||
| 325 | */ |
||
| 326 | private $update_date; |
||
| 327 | |||
| 328 | /** |
||
| 329 | * @var \DateTime|null |
||
| 330 | * |
||
| 331 | * @ORM\Column(name="order_date", type="datetimetz", nullable=true) |
||
| 332 | */ |
||
| 333 | private $order_date; |
||
| 334 | |||
| 335 | /** |
||
| 336 | * @var \DateTime|null |
||
| 337 | * |
||
| 338 | * @ORM\Column(name="shipping_date", type="datetimetz", nullable=true) |
||
| 339 | */ |
||
| 340 | private $shipping_date; |
||
| 341 | |||
| 342 | /** |
||
| 343 | * @var \DateTime|null |
||
| 344 | * |
||
| 345 | * @ORM\Column(name="payment_date", type="datetimetz", nullable=true) |
||
| 346 | */ |
||
| 347 | private $payment_date; |
||
| 348 | |||
| 349 | /** |
||
| 350 | * @var string|null |
||
| 351 | * |
||
| 352 | * @ORM\Column(name="currency_code", type="string", nullable=true) |
||
| 353 | */ |
||
| 354 | private $currency_code; |
||
| 355 | |||
| 356 | /** |
||
| 357 | * @var \Doctrine\Common\Collections\Collection |
||
| 358 | * |
||
| 359 | * @ORM\OneToMany(targetEntity="Eccube\Entity\OrderItem", mappedBy="Order", cascade={"persist","remove"}) |
||
| 360 | */ |
||
| 361 | private $OrderItems; |
||
| 362 | |||
| 363 | /** |
||
| 364 | * @var \Doctrine\Common\Collections\Collection |
||
| 365 | * |
||
| 366 | * @ORM\OneToMany(targetEntity="Eccube\Entity\MailHistory", mappedBy="Order", cascade={"remove"}) |
||
| 367 | * @ORM\OrderBy({ |
||
| 368 | * "send_date"="DESC" |
||
| 369 | * }) |
||
| 370 | */ |
||
| 371 | private $MailHistories; |
||
| 372 | |||
| 373 | /** |
||
| 374 | * @var \Eccube\Entity\Customer |
||
| 375 | * |
||
| 376 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Customer", inversedBy="Orders") |
||
| 377 | * @ORM\JoinColumns({ |
||
| 378 | * @ORM\JoinColumn(name="customer_id", referencedColumnName="id") |
||
| 379 | * }) |
||
| 380 | */ |
||
| 381 | private $Customer; |
||
| 382 | |||
| 383 | /** |
||
| 384 | * @var \Eccube\Entity\Master\Country |
||
| 385 | * |
||
| 386 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Country") |
||
| 387 | * @ORM\JoinColumns({ |
||
| 388 | * @ORM\JoinColumn(name="country_id", referencedColumnName="id") |
||
| 389 | * }) |
||
| 390 | */ |
||
| 391 | private $Country; |
||
| 392 | |||
| 393 | /** |
||
| 394 | * @var \Eccube\Entity\Master\Pref |
||
| 395 | * |
||
| 396 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Pref") |
||
| 397 | * @ORM\JoinColumns({ |
||
| 398 | * @ORM\JoinColumn(name="pref_id", referencedColumnName="id") |
||
| 399 | * }) |
||
| 400 | */ |
||
| 401 | private $Pref; |
||
| 402 | |||
| 403 | /** |
||
| 404 | * @var \Eccube\Entity\Master\Sex |
||
| 405 | * |
||
| 406 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Sex") |
||
| 407 | * @ORM\JoinColumns({ |
||
| 408 | * @ORM\JoinColumn(name="sex_id", referencedColumnName="id") |
||
| 409 | * }) |
||
| 410 | */ |
||
| 411 | private $Sex; |
||
| 412 | |||
| 413 | /** |
||
| 414 | * @var \Eccube\Entity\Master\Job |
||
| 415 | * |
||
| 416 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Job") |
||
| 417 | * @ORM\JoinColumns({ |
||
| 418 | * @ORM\JoinColumn(name="job_id", referencedColumnName="id") |
||
| 419 | * }) |
||
| 420 | */ |
||
| 421 | private $Job; |
||
| 422 | |||
| 423 | /** |
||
| 424 | * @var \Eccube\Entity\Payment |
||
| 425 | * |
||
| 426 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Payment") |
||
| 427 | * @ORM\JoinColumns({ |
||
| 428 | * @ORM\JoinColumn(name="payment_id", referencedColumnName="id") |
||
| 429 | * }) |
||
| 430 | */ |
||
| 431 | private $Payment; |
||
| 432 | |||
| 433 | /** |
||
| 434 | * @var \Eccube\Entity\Master\DeviceType |
||
| 435 | * |
||
| 436 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\DeviceType") |
||
| 437 | * @ORM\JoinColumns({ |
||
| 438 | * @ORM\JoinColumn(name="device_type_id", referencedColumnName="id") |
||
| 439 | * }) |
||
| 440 | */ |
||
| 441 | private $DeviceType; |
||
| 442 | |||
| 443 | /** |
||
| 444 | * @var \Eccube\Entity\Master\CustomerOrderStatus |
||
| 445 | * |
||
| 446 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\CustomerOrderStatus") |
||
| 447 | * @ORM\JoinColumns({ |
||
| 448 | * @ORM\JoinColumn(name="order_status_id", referencedColumnName="id") |
||
| 449 | * }) |
||
| 450 | */ |
||
| 451 | private $CustomerOrderStatus; |
||
| 452 | |||
| 453 | /** |
||
| 454 | * @var \Eccube\Entity\Master\OrderStatus |
||
| 455 | * |
||
| 456 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\OrderStatus") |
||
| 457 | * @ORM\JoinColumns({ |
||
| 458 | * @ORM\JoinColumn(name="order_status_id", referencedColumnName="id") |
||
| 459 | * }) |
||
| 460 | */ |
||
| 461 | private $OrderStatus; |
||
| 462 | |||
| 463 | /** |
||
| 464 | * Constructor |
||
| 465 | */ |
||
| 466 | 224 | public function __construct(\Eccube\Entity\Master\OrderStatus $orderStatus = null) |
|
| 481 | |||
| 482 | /** |
||
| 483 | * Get id. |
||
| 484 | * |
||
| 485 | * @return int |
||
| 486 | */ |
||
| 487 | 188 | public function getId() |
|
| 491 | |||
| 492 | /** |
||
| 493 | * Set preOrderId. |
||
| 494 | * |
||
| 495 | * @param string|null $preOrderId |
||
| 496 | * |
||
| 497 | * @return Order |
||
| 498 | */ |
||
| 499 | 185 | public function setPreOrderId($preOrderId = null) |
|
| 505 | |||
| 506 | /** |
||
| 507 | * Get preOrderId. |
||
| 508 | * |
||
| 509 | * @return string|null |
||
| 510 | */ |
||
| 511 | 53 | public function getPreOrderId() |
|
| 515 | |||
| 516 | /** |
||
| 517 | * Set orderCode |
||
| 518 | * |
||
| 519 | * @param string|null $orderCode |
||
| 520 | * |
||
| 521 | * @return Order |
||
| 522 | */ |
||
| 523 | 19 | public function setOrderCode($orderCode = null) |
|
| 529 | |||
| 530 | /** |
||
| 531 | * Get orderCode |
||
| 532 | * |
||
| 533 | * @return string|null |
||
| 534 | */ |
||
| 535 | 30 | public function getOrderCode() |
|
| 539 | |||
| 540 | /** |
||
| 541 | * Set message. |
||
| 542 | * |
||
| 543 | * @param string|null $message |
||
| 544 | * |
||
| 545 | * @return Order |
||
| 546 | */ |
||
| 547 | 161 | public function setMessage($message = null) |
|
| 553 | |||
| 554 | /** |
||
| 555 | * Get message. |
||
| 556 | * |
||
| 557 | * @return string|null |
||
| 558 | */ |
||
| 559 | 73 | public function getMessage() |
|
| 563 | |||
| 564 | /** |
||
| 565 | * Set name01. |
||
| 566 | * |
||
| 567 | * @param string|null $name01 |
||
| 568 | * |
||
| 569 | * @return Order |
||
| 570 | */ |
||
| 571 | 18 | public function setName01($name01 = null) |
|
| 577 | |||
| 578 | /** |
||
| 579 | * Get name01. |
||
| 580 | * |
||
| 581 | * @return string|null |
||
| 582 | */ |
||
| 583 | 90 | public function getName01() |
|
| 587 | |||
| 588 | /** |
||
| 589 | * Set name02. |
||
| 590 | * |
||
| 591 | * @param string|null $name02 |
||
| 592 | * |
||
| 593 | * @return Order |
||
| 594 | */ |
||
| 595 | 18 | public function setName02($name02 = null) |
|
| 601 | |||
| 602 | /** |
||
| 603 | * Get name02. |
||
| 604 | * |
||
| 605 | * @return string|null |
||
| 606 | */ |
||
| 607 | 82 | public function getName02() |
|
| 611 | |||
| 612 | /** |
||
| 613 | * Set kana01. |
||
| 614 | * |
||
| 615 | * @param string|null $kana01 |
||
| 616 | * |
||
| 617 | * @return Order |
||
| 618 | */ |
||
| 619 | 19 | public function setKana01($kana01 = null) |
|
| 625 | |||
| 626 | /** |
||
| 627 | * Get kana01. |
||
| 628 | * |
||
| 629 | * @return string|null |
||
| 630 | */ |
||
| 631 | 75 | public function getKana01() |
|
| 635 | |||
| 636 | /** |
||
| 637 | * Set kana02. |
||
| 638 | * |
||
| 639 | * @param string|null $kana02 |
||
| 640 | * |
||
| 641 | * @return Order |
||
| 642 | */ |
||
| 643 | 19 | public function setKana02($kana02 = null) |
|
| 649 | |||
| 650 | /** |
||
| 651 | * Get kana02. |
||
| 652 | * |
||
| 653 | * @return string|null |
||
| 654 | */ |
||
| 655 | 75 | public function getKana02() |
|
| 659 | |||
| 660 | /** |
||
| 661 | * Set companyName. |
||
| 662 | * |
||
| 663 | * @param string|null $companyName |
||
| 664 | * |
||
| 665 | * @return Order |
||
| 666 | */ |
||
| 667 | 16 | public function setCompanyName($companyName = null) |
|
| 673 | |||
| 674 | /** |
||
| 675 | * Get companyName. |
||
| 676 | * |
||
| 677 | * @return string|null |
||
| 678 | */ |
||
| 679 | 46 | public function getCompanyName() |
|
| 683 | |||
| 684 | /** |
||
| 685 | * Set email. |
||
| 686 | * |
||
| 687 | * @param string|null $email |
||
| 688 | * |
||
| 689 | * @return Order |
||
| 690 | */ |
||
| 691 | 16 | public function setEmail($email = null) |
|
| 697 | |||
| 698 | /** |
||
| 699 | * Get email. |
||
| 700 | * |
||
| 701 | * @return string|null |
||
| 702 | */ |
||
| 703 | 49 | public function getEmail() |
|
| 707 | |||
| 708 | /** |
||
| 709 | * Set tel01. |
||
| 710 | * |
||
| 711 | * @param string|null $tel01 |
||
| 712 | * |
||
| 713 | * @return Order |
||
| 714 | */ |
||
| 715 | 17 | public function setTel01($tel01 = null) |
|
| 721 | |||
| 722 | /** |
||
| 723 | * Get tel01. |
||
| 724 | * |
||
| 725 | * @return string|null |
||
| 726 | */ |
||
| 727 | 71 | public function getTel01() |
|
| 731 | |||
| 732 | /** |
||
| 733 | * Set tel02. |
||
| 734 | * |
||
| 735 | * @param string|null $tel02 |
||
| 736 | * |
||
| 737 | * @return Order |
||
| 738 | */ |
||
| 739 | 17 | public function setTel02($tel02 = null) |
|
| 745 | |||
| 746 | /** |
||
| 747 | * Get tel02. |
||
| 748 | * |
||
| 749 | * @return string|null |
||
| 750 | */ |
||
| 751 | 71 | public function getTel02() |
|
| 755 | |||
| 756 | /** |
||
| 757 | * Set tel03. |
||
| 758 | * |
||
| 759 | * @param string|null $tel03 |
||
| 760 | * |
||
| 761 | * @return Order |
||
| 762 | */ |
||
| 763 | 17 | public function setTel03($tel03 = null) |
|
| 769 | |||
| 770 | /** |
||
| 771 | * Get tel03. |
||
| 772 | * |
||
| 773 | * @return string|null |
||
| 774 | */ |
||
| 775 | 71 | public function getTel03() |
|
| 779 | |||
| 780 | /** |
||
| 781 | * Set fax01. |
||
| 782 | * |
||
| 783 | * @param string|null $fax01 |
||
| 784 | * |
||
| 785 | * @return Order |
||
| 786 | */ |
||
| 787 | 16 | public function setFax01($fax01 = null) |
|
| 793 | |||
| 794 | /** |
||
| 795 | * Get fax01. |
||
| 796 | * |
||
| 797 | * @return string|null |
||
| 798 | */ |
||
| 799 | 32 | public function getFax01() |
|
| 803 | |||
| 804 | /** |
||
| 805 | * Set fax02. |
||
| 806 | * |
||
| 807 | * @param string|null $fax02 |
||
| 808 | * |
||
| 809 | * @return Order |
||
| 810 | */ |
||
| 811 | 16 | public function setFax02($fax02 = null) |
|
| 817 | |||
| 818 | /** |
||
| 819 | * Get fax02. |
||
| 820 | * |
||
| 821 | * @return string|null |
||
| 822 | */ |
||
| 823 | 32 | public function getFax02() |
|
| 827 | |||
| 828 | /** |
||
| 829 | * Set fax03. |
||
| 830 | * |
||
| 831 | * @param string|null $fax03 |
||
| 832 | * |
||
| 833 | * @return Order |
||
| 834 | */ |
||
| 835 | 16 | public function setFax03($fax03 = null) |
|
| 841 | |||
| 842 | /** |
||
| 843 | * Get fax03. |
||
| 844 | * |
||
| 845 | * @return string|null |
||
| 846 | */ |
||
| 847 | 32 | public function getFax03() |
|
| 851 | |||
| 852 | /** |
||
| 853 | * Set zip01. |
||
| 854 | * |
||
| 855 | * @param string|null $zip01 |
||
| 856 | * |
||
| 857 | * @return Order |
||
| 858 | */ |
||
| 859 | 16 | public function setZip01($zip01 = null) |
|
| 865 | |||
| 866 | /** |
||
| 867 | * Get zip01. |
||
| 868 | * |
||
| 869 | * @return string|null |
||
| 870 | */ |
||
| 871 | 75 | public function getZip01() |
|
| 875 | |||
| 876 | /** |
||
| 877 | * Set zip02. |
||
| 878 | * |
||
| 879 | * @param string|null $zip02 |
||
| 880 | * |
||
| 881 | * @return Order |
||
| 882 | */ |
||
| 883 | 16 | public function setZip02($zip02 = null) |
|
| 889 | |||
| 890 | /** |
||
| 891 | * Get zip02. |
||
| 892 | * |
||
| 893 | * @return string|null |
||
| 894 | */ |
||
| 895 | 75 | public function getZip02() |
|
| 899 | |||
| 900 | /** |
||
| 901 | * Set zipcode. |
||
| 902 | * |
||
| 903 | * @param string|null $zipcode |
||
| 904 | * |
||
| 905 | * @return Order |
||
| 906 | */ |
||
| 907 | public function setZipcode($zipcode = null) |
||
| 913 | |||
| 914 | /** |
||
| 915 | * Get zipcode. |
||
| 916 | * |
||
| 917 | * @return string|null |
||
| 918 | */ |
||
| 919 | public function getZipcode() |
||
| 923 | |||
| 924 | /** |
||
| 925 | * Set addr01. |
||
| 926 | * |
||
| 927 | * @param string|null $addr01 |
||
| 928 | * |
||
| 929 | * @return Order |
||
| 930 | */ |
||
| 931 | 16 | public function setAddr01($addr01 = null) |
|
| 937 | |||
| 938 | /** |
||
| 939 | * Get addr01. |
||
| 940 | * |
||
| 941 | * @return string|null |
||
| 942 | */ |
||
| 943 | 75 | public function getAddr01() |
|
| 947 | |||
| 948 | /** |
||
| 949 | * Set addr02. |
||
| 950 | * |
||
| 951 | * @param string|null $addr02 |
||
| 952 | * |
||
| 953 | * @return Order |
||
| 954 | */ |
||
| 955 | 16 | public function setAddr02($addr02 = null) |
|
| 961 | |||
| 962 | /** |
||
| 963 | * Get addr02. |
||
| 964 | * |
||
| 965 | * @return string|null |
||
| 966 | */ |
||
| 967 | 75 | public function getAddr02() |
|
| 971 | |||
| 972 | /** |
||
| 973 | * Set birth. |
||
| 974 | * |
||
| 975 | * @param \DateTime|null $birth |
||
| 976 | * |
||
| 977 | * @return Order |
||
| 978 | */ |
||
| 979 | 5 | public function setBirth($birth = null) |
|
| 985 | |||
| 986 | /** |
||
| 987 | * Get birth. |
||
| 988 | * |
||
| 989 | * @return \DateTime|null |
||
| 990 | */ |
||
| 991 | 4 | public function getBirth() |
|
| 995 | |||
| 996 | /** |
||
| 997 | * Set subtotal. |
||
| 998 | * |
||
| 999 | * @param string $subtotal |
||
| 1000 | * |
||
| 1001 | * @return Order |
||
| 1002 | */ |
||
| 1003 | 224 | public function setSubtotal($subtotal) |
|
| 1009 | |||
| 1010 | /** |
||
| 1011 | * Get subtotal. |
||
| 1012 | * |
||
| 1013 | * @return string |
||
| 1014 | */ |
||
| 1015 | 58 | public function getSubtotal() |
|
| 1019 | |||
| 1020 | /** |
||
| 1021 | * Set discount. |
||
| 1022 | * |
||
| 1023 | * @param string $discount |
||
| 1024 | * |
||
| 1025 | * @return Order |
||
| 1026 | */ |
||
| 1027 | 224 | public function setDiscount($discount) |
|
| 1033 | |||
| 1034 | /** |
||
| 1035 | * Get discount. |
||
| 1036 | * |
||
| 1037 | * @return string |
||
| 1038 | */ |
||
| 1039 | 192 | public function getDiscount() |
|
| 1043 | |||
| 1044 | /** |
||
| 1045 | * Set deliveryFeeTotal. |
||
| 1046 | * |
||
| 1047 | * @param string $deliveryFeeTotal |
||
| 1048 | * |
||
| 1049 | * @return Order |
||
| 1050 | */ |
||
| 1051 | 224 | public function setDeliveryFeeTotal($deliveryFeeTotal) |
|
| 1057 | |||
| 1058 | /** |
||
| 1059 | * Get deliveryFeeTotal. |
||
| 1060 | * |
||
| 1061 | * @return string |
||
| 1062 | */ |
||
| 1063 | 73 | public function getDeliveryFeeTotal() |
|
| 1067 | |||
| 1068 | /** |
||
| 1069 | * Set charge. |
||
| 1070 | * |
||
| 1071 | * @param string $charge |
||
| 1072 | * |
||
| 1073 | * @return Order |
||
| 1074 | */ |
||
| 1075 | 224 | public function setCharge($charge) |
|
| 1081 | |||
| 1082 | /** |
||
| 1083 | * Get charge. |
||
| 1084 | * |
||
| 1085 | * @return string |
||
| 1086 | */ |
||
| 1087 | 192 | public function getCharge() |
|
| 1091 | |||
| 1092 | /** |
||
| 1093 | * Set tax. |
||
| 1094 | * |
||
| 1095 | * @param string $tax |
||
| 1096 | * |
||
| 1097 | * @return Order |
||
| 1098 | */ |
||
| 1099 | 224 | public function setTax($tax) |
|
| 1105 | |||
| 1106 | /** |
||
| 1107 | * Get tax. |
||
| 1108 | * |
||
| 1109 | * @return string |
||
| 1110 | */ |
||
| 1111 | 17 | public function getTax() |
|
| 1115 | |||
| 1116 | /** |
||
| 1117 | * Set total. |
||
| 1118 | * |
||
| 1119 | * @param string $total |
||
| 1120 | * |
||
| 1121 | * @return Order |
||
| 1122 | */ |
||
| 1123 | 224 | public function setTotal($total) |
|
| 1129 | |||
| 1130 | /** |
||
| 1131 | * Get total. |
||
| 1132 | * |
||
| 1133 | * @return string |
||
| 1134 | */ |
||
| 1135 | 190 | public function getTotal() |
|
| 1139 | |||
| 1140 | /** |
||
| 1141 | * Set paymentTotal. |
||
| 1142 | * |
||
| 1143 | * @param string $paymentTotal |
||
| 1144 | * |
||
| 1145 | * @return Order |
||
| 1146 | */ |
||
| 1147 | 224 | public function setPaymentTotal($paymentTotal) |
|
| 1153 | |||
| 1154 | /** |
||
| 1155 | * Get paymentTotal. |
||
| 1156 | * |
||
| 1157 | * @return string |
||
| 1158 | */ |
||
| 1159 | 26 | public function getPaymentTotal() |
|
| 1163 | |||
| 1164 | /** |
||
| 1165 | * Set paymentMethod. |
||
| 1166 | * |
||
| 1167 | * @param string|null $paymentMethod |
||
| 1168 | * |
||
| 1169 | * @return Order |
||
| 1170 | */ |
||
| 1171 | 198 | public function setPaymentMethod($paymentMethod = null) |
|
| 1177 | |||
| 1178 | /** |
||
| 1179 | * Get paymentMethod. |
||
| 1180 | * |
||
| 1181 | * @return string|null |
||
| 1182 | */ |
||
| 1183 | 21 | public function getPaymentMethod() |
|
| 1187 | |||
| 1188 | /** |
||
| 1189 | * Set note. |
||
| 1190 | * |
||
| 1191 | * @param string|null $note |
||
| 1192 | * |
||
| 1193 | * @return Order |
||
| 1194 | */ |
||
| 1195 | 136 | public function setNote($note = null) |
|
| 1201 | |||
| 1202 | /** |
||
| 1203 | * Get note. |
||
| 1204 | * |
||
| 1205 | * @return string|null |
||
| 1206 | */ |
||
| 1207 | 28 | public function getNote() |
|
| 1211 | |||
| 1212 | /** |
||
| 1213 | * Set createDate. |
||
| 1214 | * |
||
| 1215 | * @param \DateTime $createDate |
||
| 1216 | * |
||
| 1217 | * @return Order |
||
| 1218 | */ |
||
| 1219 | 187 | public function setCreateDate($createDate) |
|
| 1225 | |||
| 1226 | /** |
||
| 1227 | * Get createDate. |
||
| 1228 | * |
||
| 1229 | * @return \DateTime |
||
| 1230 | */ |
||
| 1231 | public function getCreateDate() |
||
| 1235 | |||
| 1236 | /** |
||
| 1237 | * Set updateDate. |
||
| 1238 | * |
||
| 1239 | * @param \DateTime $updateDate |
||
| 1240 | * |
||
| 1241 | * @return Order |
||
| 1242 | */ |
||
| 1243 | 187 | public function setUpdateDate($updateDate) |
|
| 1249 | |||
| 1250 | /** |
||
| 1251 | * Get updateDate. |
||
| 1252 | * |
||
| 1253 | * @return \DateTime |
||
| 1254 | */ |
||
| 1255 | 2 | public function getUpdateDate() |
|
| 1259 | |||
| 1260 | /** |
||
| 1261 | * Set orderDate. |
||
| 1262 | * |
||
| 1263 | * @param \DateTime|null $orderDate |
||
| 1264 | * |
||
| 1265 | * @return Order |
||
| 1266 | */ |
||
| 1267 | 34 | public function setOrderDate($orderDate = null) |
|
| 1273 | |||
| 1274 | /** |
||
| 1275 | * Get orderDate. |
||
| 1276 | * |
||
| 1277 | * @return \DateTime|null |
||
| 1278 | */ |
||
| 1279 | 13 | public function getOrderDate() |
|
| 1283 | |||
| 1284 | /** |
||
| 1285 | * Set shippingDate. |
||
| 1286 | * |
||
| 1287 | * @param \DateTime|null $shippingDate |
||
| 1288 | * |
||
| 1289 | * @return Order |
||
| 1290 | */ |
||
| 1291 | 4 | public function setShippingDate($shippingDate = null) |
|
| 1297 | |||
| 1298 | /** |
||
| 1299 | * Get shippingDate. |
||
| 1300 | * |
||
| 1301 | * @return \DateTime|null |
||
| 1302 | */ |
||
| 1303 | 7 | public function getShippingDate() |
|
| 1307 | |||
| 1308 | /** |
||
| 1309 | * Set paymentDate. |
||
| 1310 | * |
||
| 1311 | * @param \DateTime|null $paymentDate |
||
| 1312 | * |
||
| 1313 | * @return Order |
||
| 1314 | */ |
||
| 1315 | 4 | public function setPaymentDate($paymentDate = null) |
|
| 1321 | |||
| 1322 | /** |
||
| 1323 | * Get paymentDate. |
||
| 1324 | * |
||
| 1325 | * @return \DateTime|null |
||
| 1326 | */ |
||
| 1327 | 9 | public function getPaymentDate() |
|
| 1331 | |||
| 1332 | /** |
||
| 1333 | * Get currencyCode. |
||
| 1334 | * |
||
| 1335 | * @return string |
||
| 1336 | */ |
||
| 1337 | public function getCurrencyCode() |
||
| 1341 | |||
| 1342 | /** |
||
| 1343 | * Set currencyCode. |
||
| 1344 | * |
||
| 1345 | * @param string|null $currencyCode |
||
| 1346 | * |
||
| 1347 | * @return $this |
||
| 1348 | */ |
||
| 1349 | 187 | public function setCurrencyCode($currencyCode = null) |
|
| 1355 | |||
| 1356 | /** |
||
| 1357 | * 商品の受注明細を取得 |
||
| 1358 | * |
||
| 1359 | * @return OrderItem[] |
||
| 1360 | */ |
||
| 1361 | 30 | public function getProductOrderItems() |
|
| 1367 | |||
| 1368 | /** |
||
| 1369 | * 同じ規格の商品の個数をまとめた受注明細を取得 |
||
| 1370 | * |
||
| 1371 | * @return OrderItem[] |
||
| 1372 | */ |
||
| 1373 | 1 | public function getMergedProductOrderItems() |
|
| 1404 | |||
| 1405 | /** |
||
| 1406 | * Add orderItem. |
||
| 1407 | * |
||
| 1408 | * @param \Eccube\Entity\OrderItem $OrderItem |
||
| 1409 | * |
||
| 1410 | * @return Order |
||
| 1411 | */ |
||
| 1412 | 207 | public function addOrderItem(\Eccube\Entity\OrderItem $OrderItem) |
|
| 1418 | |||
| 1419 | /** |
||
| 1420 | * Remove orderItem. |
||
| 1421 | * |
||
| 1422 | * @param \Eccube\Entity\OrderItem $OrderItem |
||
| 1423 | * |
||
| 1424 | * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. |
||
| 1425 | */ |
||
| 1426 | 28 | public function removeOrderItem(\Eccube\Entity\OrderItem $OrderItem) |
|
| 1430 | |||
| 1431 | /** |
||
| 1432 | * Get orderItems. |
||
| 1433 | * |
||
| 1434 | * @return \Doctrine\Common\Collections\Collection |
||
| 1435 | */ |
||
| 1436 | 218 | public function getOrderItems() |
|
| 1440 | |||
| 1441 | /** |
||
| 1442 | * Sorted to getOrderItems() |
||
| 1443 | * |
||
| 1444 | * @return ItemCollection |
||
| 1445 | */ |
||
| 1446 | 197 | public function getItems() |
|
| 1450 | |||
| 1451 | /** |
||
| 1452 | * Get shippings. |
||
| 1453 | * |
||
| 1454 | * 明細に紐づくShippingを, 重複をのぞいて取得する |
||
| 1455 | * |
||
| 1456 | * @return \Doctrine\Common\Collections\Collection|Shipping[] |
||
| 1457 | */ |
||
| 1458 | 90 | public function getShippings() |
|
| 1490 | |||
| 1491 | 25 | public function setShippings($dummy) |
|
| 1496 | |||
| 1497 | /** |
||
| 1498 | * Add mailHistory. |
||
| 1499 | * |
||
| 1500 | * @param \Eccube\Entity\MailHistory $mailHistory |
||
| 1501 | * |
||
| 1502 | * @return Order |
||
| 1503 | */ |
||
| 1504 | public function addMailHistory(\Eccube\Entity\MailHistory $mailHistory) |
||
| 1510 | |||
| 1511 | /** |
||
| 1512 | * Remove mailHistory. |
||
| 1513 | * |
||
| 1514 | * @param \Eccube\Entity\MailHistory $mailHistory |
||
| 1515 | * |
||
| 1516 | * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. |
||
| 1517 | */ |
||
| 1518 | public function removeMailHistory(\Eccube\Entity\MailHistory $mailHistory) |
||
| 1522 | |||
| 1523 | /** |
||
| 1524 | * Get mailHistories. |
||
| 1525 | * |
||
| 1526 | * @return \Doctrine\Common\Collections\Collection |
||
| 1527 | */ |
||
| 1528 | 1 | public function getMailHistories() |
|
| 1532 | |||
| 1533 | /** |
||
| 1534 | * Set customer. |
||
| 1535 | * |
||
| 1536 | * @param \Eccube\Entity\Customer|null $customer |
||
| 1537 | * |
||
| 1538 | * @return Order |
||
| 1539 | */ |
||
| 1540 | 170 | public function setCustomer(\Eccube\Entity\Customer $customer = null) |
|
| 1546 | |||
| 1547 | /** |
||
| 1548 | * Get customer. |
||
| 1549 | * |
||
| 1550 | * @return \Eccube\Entity\Customer|null |
||
| 1551 | */ |
||
| 1552 | 81 | public function getCustomer() |
|
| 1556 | |||
| 1557 | /** |
||
| 1558 | * Set country. |
||
| 1559 | * |
||
| 1560 | * @param \Eccube\Entity\Master\Country|null $country |
||
| 1561 | * |
||
| 1562 | * @return Order |
||
| 1563 | */ |
||
| 1564 | public function setCountry(\Eccube\Entity\Master\Country $country = null) |
||
| 1570 | |||
| 1571 | /** |
||
| 1572 | * Get country. |
||
| 1573 | * |
||
| 1574 | * @return \Eccube\Entity\Master\Country|null |
||
| 1575 | */ |
||
| 1576 | public function getCountry() |
||
| 1580 | |||
| 1581 | /** |
||
| 1582 | * Set pref. |
||
| 1583 | * |
||
| 1584 | * @param \Eccube\Entity\Master\Pref|null $pref |
||
| 1585 | * |
||
| 1586 | * @return Order |
||
| 1587 | */ |
||
| 1588 | 147 | public function setPref(\Eccube\Entity\Master\Pref $pref = null) |
|
| 1594 | |||
| 1595 | /** |
||
| 1596 | * Get pref. |
||
| 1597 | * |
||
| 1598 | * @return \Eccube\Entity\Master\Pref|null |
||
| 1599 | */ |
||
| 1600 | 75 | public function getPref() |
|
| 1604 | |||
| 1605 | /** |
||
| 1606 | * Set sex. |
||
| 1607 | * |
||
| 1608 | * @param \Eccube\Entity\Master\Sex|null $sex |
||
| 1609 | * |
||
| 1610 | * @return Order |
||
| 1611 | */ |
||
| 1612 | 6 | public function setSex(\Eccube\Entity\Master\Sex $sex = null) |
|
| 1618 | |||
| 1619 | /** |
||
| 1620 | * Get sex. |
||
| 1621 | * |
||
| 1622 | * @return \Eccube\Entity\Master\Sex|null |
||
| 1623 | */ |
||
| 1624 | 4 | public function getSex() |
|
| 1628 | |||
| 1629 | /** |
||
| 1630 | * Set job. |
||
| 1631 | * |
||
| 1632 | * @param \Eccube\Entity\Master\Job|null $job |
||
| 1633 | * |
||
| 1634 | * @return Order |
||
| 1635 | */ |
||
| 1636 | 5 | public function setJob(\Eccube\Entity\Master\Job $job = null) |
|
| 1642 | |||
| 1643 | /** |
||
| 1644 | * Get job. |
||
| 1645 | * |
||
| 1646 | * @return \Eccube\Entity\Master\Job|null |
||
| 1647 | */ |
||
| 1648 | 4 | public function getJob() |
|
| 1652 | |||
| 1653 | /** |
||
| 1654 | * Set payment. |
||
| 1655 | * |
||
| 1656 | * @param \Eccube\Entity\Payment|null $payment |
||
| 1657 | * |
||
| 1658 | * @return Order |
||
| 1659 | */ |
||
| 1660 | 198 | public function setPayment(\Eccube\Entity\Payment $payment = null) |
|
| 1666 | |||
| 1667 | /** |
||
| 1668 | * Get payment. |
||
| 1669 | * |
||
| 1670 | * @return \Eccube\Entity\Payment|null |
||
| 1671 | */ |
||
| 1672 | 198 | public function getPayment() |
|
| 1676 | |||
| 1677 | /** |
||
| 1678 | * Set deviceType. |
||
| 1679 | * |
||
| 1680 | * @param \Eccube\Entity\Master\DeviceType|null $deviceType |
||
| 1681 | * |
||
| 1682 | * @return Order |
||
| 1683 | */ |
||
| 1684 | 3 | public function setDeviceType(\Eccube\Entity\Master\DeviceType $deviceType = null) |
|
| 1690 | |||
| 1691 | /** |
||
| 1692 | * Get deviceType. |
||
| 1693 | * |
||
| 1694 | * @return \Eccube\Entity\Master\DeviceType|null |
||
| 1695 | */ |
||
| 1696 | public function getDeviceType() |
||
| 1700 | |||
| 1701 | /** |
||
| 1702 | * Set customerOrderStatus. |
||
| 1703 | * |
||
| 1704 | * @param \Eccube\Entity\Master\CustomerOrderStatus|null $customerOrderStatus |
||
| 1705 | * |
||
| 1706 | * @return Order |
||
| 1707 | */ |
||
| 1708 | public function setCustomerOrderStatus(\Eccube\Entity\Master\CustomerOrderStatus $customerOrderStatus = null) |
||
| 1714 | |||
| 1715 | /** |
||
| 1716 | * Get customerOrderStatus. |
||
| 1717 | * |
||
| 1718 | * @return \Eccube\Entity\Master\CustomerOrderStatus|null |
||
| 1719 | */ |
||
| 1720 | public function getCustomerOrderStatus() |
||
| 1724 | |||
| 1725 | /** |
||
| 1726 | * Set orderStatus. |
||
| 1727 | * |
||
| 1728 | * @param \Eccube\Entity\Master\OrderStatus|null $orderStatus |
||
| 1729 | * |
||
| 1730 | * @return Order |
||
| 1731 | */ |
||
| 1732 | 224 | public function setOrderStatus(\Eccube\Entity\Master\OrderStatus $orderStatus = null) |
|
| 1738 | |||
| 1739 | /** |
||
| 1740 | * Get orderStatus. |
||
| 1741 | * |
||
| 1742 | * @return \Eccube\Entity\Master\OrderStatus|null |
||
| 1743 | */ |
||
| 1744 | 154 | public function getOrderStatus() |
|
| 1748 | |||
| 1749 | /** |
||
| 1750 | * @param ItemInterface $item |
||
| 1751 | */ |
||
| 1752 | 56 | public function addItem(ItemInterface $item) |
|
| 1756 | |||
| 1757 | 1 | public function getQuantity() |
|
| 1766 | } |
||
| 1767 |
If you suppress an error, we recommend checking for the error condition explicitly: