Complex classes like Payone_TransactionStatus_Request 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 Payone_TransactionStatus_Request, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 32 | class Payone_TransactionStatus_Request extends Payone_TransactionStatus_Request_Abstract |
||
| 33 | { |
||
| 34 | /** |
||
| 35 | * @var string Payment portal key as MD5 value |
||
| 36 | */ |
||
| 37 | protected $key = NULL; |
||
| 38 | /** |
||
| 39 | * @var string |
||
| 40 | */ |
||
| 41 | protected $txaction = NULL; |
||
| 42 | /** |
||
| 43 | * @var string |
||
| 44 | */ |
||
| 45 | protected $mode = NULL; |
||
| 46 | /** |
||
| 47 | * @var int Payment portal ID |
||
| 48 | */ |
||
| 49 | protected $portalid = NULL; |
||
| 50 | /** |
||
| 51 | * @var int Account ID (subaccount ID) |
||
| 52 | */ |
||
| 53 | protected $aid = NULL; |
||
| 54 | /** * |
||
| 55 | * @var string |
||
| 56 | */ |
||
| 57 | protected $clearingtype = NULL; |
||
| 58 | /** |
||
| 59 | * unix timestamp |
||
| 60 | * |
||
| 61 | * @var int |
||
| 62 | */ |
||
| 63 | protected $txtime = NULL; |
||
| 64 | /** |
||
| 65 | * @var string ISO-4217 |
||
| 66 | */ |
||
| 67 | protected $currency = NULL; |
||
| 68 | /** |
||
| 69 | * @var int |
||
| 70 | */ |
||
| 71 | protected $userid = NULL; |
||
| 72 | /** |
||
| 73 | * @var int |
||
| 74 | */ |
||
| 75 | protected $customerid = NULL; |
||
| 76 | /** |
||
| 77 | * @var string |
||
| 78 | */ |
||
| 79 | protected $param = NULL; |
||
| 80 | |||
| 81 | // Parameter bei einer Statusmeldung eines Zahlungsvorgangs |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @var int |
||
| 85 | */ |
||
| 86 | protected $txid = NULL; |
||
| 87 | /** |
||
| 88 | * @var string |
||
| 89 | */ |
||
| 90 | protected $reference = NULL; |
||
| 91 | /** |
||
| 92 | * @var string |
||
| 93 | */ |
||
| 94 | protected $sequencenumber = NULL; |
||
| 95 | /** |
||
| 96 | * @var string |
||
| 97 | */ |
||
| 98 | protected $receivable = NULL; |
||
| 99 | /** |
||
| 100 | * @var string |
||
| 101 | */ |
||
| 102 | protected $balance = NULL; |
||
| 103 | /** |
||
| 104 | * @var string |
||
| 105 | */ |
||
| 106 | protected $failedcause = NULL; |
||
| 107 | |||
| 108 | // Zusätzliche Parameter Contract bei Statusmeldung eines Zahlungsvorgangs |
||
| 109 | |||
| 110 | /** |
||
| 111 | * @var int |
||
| 112 | */ |
||
| 113 | protected $productid = NULL; |
||
| 114 | /** |
||
| 115 | * @var int |
||
| 116 | */ |
||
| 117 | protected $accessid = NULL; |
||
| 118 | |||
| 119 | // Zusätzliche Parameter Collect (txaction=reminder) bei Statusmeldung eines Zahlungsvorgangs |
||
| 120 | |||
| 121 | /** |
||
| 122 | * @var string |
||
| 123 | */ |
||
| 124 | protected $reminderlevel = NULL; |
||
| 125 | |||
| 126 | // Parameter Invoicing (txaction=invoice) |
||
| 127 | |||
| 128 | /** |
||
| 129 | * @var string |
||
| 130 | */ |
||
| 131 | protected $invoiceid = NULL; |
||
| 132 | /** |
||
| 133 | * @var string |
||
| 134 | */ |
||
| 135 | protected $invoice_grossamount = NULL; |
||
| 136 | /** |
||
| 137 | * @var string |
||
| 138 | */ |
||
| 139 | protected $invoice_date = NULL; |
||
| 140 | /** |
||
| 141 | * @var string |
||
| 142 | */ |
||
| 143 | protected $invoice_deliverydate = NULL; |
||
| 144 | /** |
||
| 145 | * @var string |
||
| 146 | */ |
||
| 147 | protected $invoice_deliveryenddate = NULL; |
||
| 148 | |||
| 149 | |||
| 150 | /** |
||
| 151 | * @var string |
||
| 152 | */ |
||
| 153 | protected $clearing_bankaccountholder = NULL; |
||
| 154 | /** |
||
| 155 | * @var string |
||
| 156 | */ |
||
| 157 | protected $clearing_bankcountry = NULL; |
||
| 158 | /** |
||
| 159 | * @var string |
||
| 160 | */ |
||
| 161 | protected $clearing_bankaccount = NULL; |
||
| 162 | /** |
||
| 163 | * @var string |
||
| 164 | */ |
||
| 165 | protected $clearing_bankcode = NULL; |
||
| 166 | /** |
||
| 167 | * @var string |
||
| 168 | */ |
||
| 169 | protected $clearing_bankiban = NULL; |
||
| 170 | /** |
||
| 171 | * @var string |
||
| 172 | */ |
||
| 173 | protected $clearing_bankbic = NULL; |
||
| 174 | /** |
||
| 175 | * @var string |
||
| 176 | */ |
||
| 177 | protected $clearing_bankcity = NULL; |
||
| 178 | /** |
||
| 179 | * @var string |
||
| 180 | */ |
||
| 181 | protected $clearing_bankname = NULL; |
||
| 182 | |||
| 183 | |||
| 184 | /** @var string */ |
||
| 185 | protected $clearing_legalnote = NULL; |
||
| 186 | |||
| 187 | /** |
||
| 188 | * (YYYYMMDD) |
||
| 189 | * @var string |
||
| 190 | */ |
||
| 191 | protected $clearing_duedate = NULL; |
||
| 192 | |||
| 193 | /** @var string */ |
||
| 194 | protected $clearing_reference = NULL; |
||
| 195 | |||
| 196 | /** @var string */ |
||
| 197 | protected $clearing_instructionnote = NULL; |
||
| 198 | |||
| 199 | /** |
||
| 200 | * @var string |
||
| 201 | */ |
||
| 202 | protected $iban = NULL; |
||
| 203 | /** |
||
| 204 | * @var string |
||
| 205 | */ |
||
| 206 | protected $bic = NULL; |
||
| 207 | /** |
||
| 208 | * @var string |
||
| 209 | */ |
||
| 210 | protected $mandate_identification = NULL; |
||
| 211 | /** |
||
| 212 | * @var string |
||
| 213 | */ |
||
| 214 | protected $creditor_identifier = NULL; |
||
| 215 | /** |
||
| 216 | * Format YYYYMMDD |
||
| 217 | * @var int |
||
| 218 | */ |
||
| 219 | protected $clearing_date = NULL; |
||
| 220 | /** |
||
| 221 | * @var float |
||
| 222 | */ |
||
| 223 | protected $clearing_amount = NULL; |
||
| 224 | |||
| 225 | |||
| 226 | /** |
||
| 227 | * @param int $accessid |
||
| 228 | */ |
||
| 229 | public function setAccessid($accessid) |
||
| 233 | |||
| 234 | /** |
||
| 235 | * @return int |
||
| 236 | */ |
||
| 237 | public function getAccessid() |
||
| 241 | |||
| 242 | /** |
||
| 243 | * @param int $aid |
||
| 244 | */ |
||
| 245 | public function setAid($aid) |
||
| 249 | |||
| 250 | /** |
||
| 251 | * @return int |
||
| 252 | */ |
||
| 253 | public function getAid() |
||
| 257 | |||
| 258 | /** |
||
| 259 | * @param string $balance |
||
| 260 | */ |
||
| 261 | public function setBalance($balance) |
||
| 265 | |||
| 266 | /** |
||
| 267 | * @return string |
||
| 268 | */ |
||
| 269 | public function getBalance() |
||
| 273 | |||
| 274 | /** |
||
| 275 | * @param string $clearingtype |
||
| 276 | */ |
||
| 277 | public function setClearingtype($clearingtype) |
||
| 281 | |||
| 282 | /** |
||
| 283 | * @return string |
||
| 284 | */ |
||
| 285 | public function getClearingtype() |
||
| 289 | |||
| 290 | /** |
||
| 291 | * @param string $currency |
||
| 292 | */ |
||
| 293 | public function setCurrency($currency) |
||
| 297 | |||
| 298 | /** |
||
| 299 | * @return string |
||
| 300 | */ |
||
| 301 | public function getCurrency() |
||
| 305 | |||
| 306 | /** |
||
| 307 | * @param int $customerid |
||
| 308 | */ |
||
| 309 | public function setCustomerid($customerid) |
||
| 313 | |||
| 314 | /** |
||
| 315 | * @return int |
||
| 316 | */ |
||
| 317 | public function getCustomerid() |
||
| 321 | |||
| 322 | /** |
||
| 323 | * @param string $failedcause |
||
| 324 | */ |
||
| 325 | public function setFailedcause($failedcause) |
||
| 329 | |||
| 330 | /** |
||
| 331 | * @return string |
||
| 332 | */ |
||
| 333 | public function getFailedcause() |
||
| 337 | |||
| 338 | /** |
||
| 339 | * @param string $invoice_date |
||
| 340 | */ |
||
| 341 | public function setInvoiceDate($invoice_date) |
||
| 345 | |||
| 346 | /** |
||
| 347 | * @return string |
||
| 348 | */ |
||
| 349 | public function getInvoiceDate() |
||
| 353 | |||
| 354 | /** |
||
| 355 | * @param string $invoice_deliverydate |
||
| 356 | */ |
||
| 357 | public function setInvoiceDeliverydate($invoice_deliverydate) |
||
| 361 | |||
| 362 | /** |
||
| 363 | * @return string |
||
| 364 | */ |
||
| 365 | public function getInvoiceDeliverydate() |
||
| 369 | |||
| 370 | /** |
||
| 371 | * @param string $invoice_deliveryenddate |
||
| 372 | */ |
||
| 373 | public function setInvoiceDeliveryenddate($invoice_deliveryenddate) |
||
| 377 | |||
| 378 | /** |
||
| 379 | * @return string |
||
| 380 | */ |
||
| 381 | public function getInvoiceDeliveryenddate() |
||
| 385 | |||
| 386 | /** |
||
| 387 | * @param string $invoice_grossamount |
||
| 388 | */ |
||
| 389 | public function setInvoiceGrossamount($invoice_grossamount) |
||
| 393 | |||
| 394 | /** |
||
| 395 | * @return string |
||
| 396 | */ |
||
| 397 | public function getInvoiceGrossamount() |
||
| 401 | |||
| 402 | /** |
||
| 403 | * @param string $invoiceid |
||
| 404 | */ |
||
| 405 | public function setInvoiceid($invoiceid) |
||
| 409 | |||
| 410 | /** |
||
| 411 | * @return string |
||
| 412 | */ |
||
| 413 | public function getInvoiceid() |
||
| 417 | |||
| 418 | /** |
||
| 419 | * @param string $key |
||
| 420 | */ |
||
| 421 | public function setKey($key) |
||
| 425 | |||
| 426 | /** |
||
| 427 | * @return string |
||
| 428 | */ |
||
| 429 | public function getKey() |
||
| 433 | |||
| 434 | /** |
||
| 435 | * @param string $mode |
||
| 436 | */ |
||
| 437 | public function setMode($mode) |
||
| 441 | |||
| 442 | /** |
||
| 443 | * @return string |
||
| 444 | */ |
||
| 445 | public function getMode() |
||
| 449 | |||
| 450 | /** |
||
| 451 | * @param string $param |
||
| 452 | */ |
||
| 453 | public function setParam($param) |
||
| 457 | |||
| 458 | /** |
||
| 459 | * @return string |
||
| 460 | */ |
||
| 461 | public function getParam() |
||
| 465 | |||
| 466 | /** |
||
| 467 | * @param int $portalid |
||
| 468 | */ |
||
| 469 | public function setPortalid($portalid) |
||
| 473 | |||
| 474 | /** |
||
| 475 | * @return int |
||
| 476 | */ |
||
| 477 | public function getPortalid() |
||
| 481 | |||
| 482 | /** |
||
| 483 | * @param int $productid |
||
| 484 | */ |
||
| 485 | public function setProductid($productid) |
||
| 489 | |||
| 490 | /** |
||
| 491 | * @return int |
||
| 492 | */ |
||
| 493 | public function getProductid() |
||
| 497 | |||
| 498 | /** |
||
| 499 | * @param string $receivable |
||
| 500 | */ |
||
| 501 | public function setReceivable($receivable) |
||
| 505 | |||
| 506 | /** |
||
| 507 | * @return string |
||
| 508 | */ |
||
| 509 | public function getReceivable() |
||
| 513 | |||
| 514 | /** |
||
| 515 | * @param string $reference |
||
| 516 | */ |
||
| 517 | public function setReference($reference) |
||
| 521 | |||
| 522 | /** |
||
| 523 | * @return string |
||
| 524 | */ |
||
| 525 | public function getReference() |
||
| 529 | |||
| 530 | /** |
||
| 531 | * @param string $reminderlevel |
||
| 532 | */ |
||
| 533 | public function setReminderlevel($reminderlevel) |
||
| 537 | |||
| 538 | /** |
||
| 539 | * @return string |
||
| 540 | */ |
||
| 541 | public function getReminderlevel() |
||
| 545 | |||
| 546 | /** |
||
| 547 | * @param string $sequencenumber |
||
| 548 | */ |
||
| 549 | public function setSequencenumber($sequencenumber) |
||
| 553 | |||
| 554 | /** |
||
| 555 | * @return string |
||
| 556 | */ |
||
| 557 | public function getSequencenumber() |
||
| 561 | |||
| 562 | /** |
||
| 563 | * @param string $txaction |
||
| 564 | */ |
||
| 565 | public function setTxaction($txaction) |
||
| 569 | |||
| 570 | /** |
||
| 571 | * @return string |
||
| 572 | */ |
||
| 573 | public function getTxaction() |
||
| 577 | |||
| 578 | /** |
||
| 579 | * @param int $txid |
||
| 580 | */ |
||
| 581 | public function setTxid($txid) |
||
| 585 | |||
| 586 | /** |
||
| 587 | * @return int |
||
| 588 | */ |
||
| 589 | public function getTxid() |
||
| 593 | |||
| 594 | /** |
||
| 595 | * @param int $txtime |
||
| 596 | */ |
||
| 597 | public function setTxtime($txtime) |
||
| 601 | |||
| 602 | /** |
||
| 603 | * @return int |
||
| 604 | */ |
||
| 605 | public function getTxtime() |
||
| 609 | |||
| 610 | /** |
||
| 611 | * @param int $userid |
||
| 612 | */ |
||
| 613 | public function setUserid($userid) |
||
| 617 | |||
| 618 | /** |
||
| 619 | * @return int |
||
| 620 | */ |
||
| 621 | public function getUserid() |
||
| 625 | |||
| 626 | /** |
||
| 627 | * @param string $clearing_bankaccount |
||
| 628 | */ |
||
| 629 | public function setClearingBankaccount( $clearing_bankaccount) |
||
| 633 | |||
| 634 | /** |
||
| 635 | * @return string |
||
| 636 | */ |
||
| 637 | public function getClearingBankaccount() |
||
| 641 | |||
| 642 | /** |
||
| 643 | * @param string $clearing_bankaccountholder |
||
| 644 | */ |
||
| 645 | public function setClearingBankaccountholder( $clearing_bankaccountholder) |
||
| 649 | |||
| 650 | /** |
||
| 651 | * @return string |
||
| 652 | */ |
||
| 653 | public function getClearingBankaccountholder() |
||
| 657 | |||
| 658 | /** |
||
| 659 | * @param string $clearing_bankbic |
||
| 660 | */ |
||
| 661 | public function setClearingBankbic( $clearing_bankbic) |
||
| 665 | |||
| 666 | /** |
||
| 667 | * @return string |
||
| 668 | */ |
||
| 669 | public function getClearingBankbic() |
||
| 673 | |||
| 674 | /** |
||
| 675 | * @param string $clearing_bankcity |
||
| 676 | */ |
||
| 677 | public function setClearingBankcity( $clearing_bankcity) |
||
| 681 | |||
| 682 | /** |
||
| 683 | * @return string |
||
| 684 | */ |
||
| 685 | public function getClearingBankcity() |
||
| 689 | |||
| 690 | /** |
||
| 691 | * @param string $clearing_bankcode |
||
| 692 | */ |
||
| 693 | public function setClearingBankcode( $clearing_bankcode) |
||
| 697 | |||
| 698 | /** |
||
| 699 | * @return string |
||
| 700 | */ |
||
| 701 | public function getClearingBankcode() |
||
| 705 | |||
| 706 | /** |
||
| 707 | * @param string $clearing_bankcountry |
||
| 708 | */ |
||
| 709 | public function setClearingBankcountry( $clearing_bankcountry) |
||
| 713 | |||
| 714 | /** |
||
| 715 | * @return string |
||
| 716 | */ |
||
| 717 | public function getClearingBankcountry() |
||
| 721 | |||
| 722 | /** |
||
| 723 | * @param string $clearing_bankiban |
||
| 724 | */ |
||
| 725 | public function setClearingBankiban( $clearing_bankiban) |
||
| 729 | |||
| 730 | /** |
||
| 731 | * @return string |
||
| 732 | */ |
||
| 733 | public function getClearingBankiban() |
||
| 737 | |||
| 738 | /** |
||
| 739 | * @param string $clearing_bankname |
||
| 740 | */ |
||
| 741 | public function setClearingBankname( $clearing_bankname) |
||
| 745 | |||
| 746 | /** |
||
| 747 | * @return string |
||
| 748 | */ |
||
| 749 | public function getClearingBankname() |
||
| 753 | |||
| 754 | /** |
||
| 755 | * @param string $clearing_duedate |
||
| 756 | */ |
||
| 757 | public function setClearingDuedate( $clearing_duedate) |
||
| 761 | |||
| 762 | /** |
||
| 763 | * @return string |
||
| 764 | */ |
||
| 765 | public function getClearingDuedate() |
||
| 769 | |||
| 770 | /** |
||
| 771 | * @param string $clearing_instructionnote |
||
| 772 | */ |
||
| 773 | public function setClearingInstructionnote( $clearing_instructionnote) |
||
| 777 | |||
| 778 | /** |
||
| 779 | * @return string |
||
| 780 | */ |
||
| 781 | public function getClearingInstructionnote() |
||
| 785 | |||
| 786 | /** |
||
| 787 | * @param string $clearing_legalnote |
||
| 788 | */ |
||
| 789 | public function setClearingLegalnote( $clearing_legalnote) |
||
| 793 | |||
| 794 | /** |
||
| 795 | * @return string |
||
| 796 | */ |
||
| 797 | public function getClearingLegalnote() |
||
| 801 | |||
| 802 | /** |
||
| 803 | * @param string $clearing_reference |
||
| 804 | */ |
||
| 805 | public function setClearingReference( $clearing_reference) |
||
| 809 | |||
| 810 | /** |
||
| 811 | * @return string |
||
| 812 | */ |
||
| 813 | public function getClearingReference() |
||
| 817 | |||
| 818 | /** |
||
| 819 | * @param string $iban |
||
| 820 | */ |
||
| 821 | public function setIban($iban) |
||
| 825 | |||
| 826 | /** |
||
| 827 | * @return string |
||
| 828 | */ |
||
| 829 | public function getIban() |
||
| 833 | |||
| 834 | /** |
||
| 835 | * @param string $bic |
||
| 836 | */ |
||
| 837 | public function setBic($bic) |
||
| 841 | |||
| 842 | /** |
||
| 843 | * @return string |
||
| 844 | */ |
||
| 845 | public function getBic() |
||
| 849 | |||
| 850 | /** |
||
| 851 | * @param string $mandateIdentification |
||
| 852 | */ |
||
| 853 | public function setMandateIdentification($mandateIdentification) |
||
| 857 | |||
| 858 | /** |
||
| 859 | * @return string |
||
| 860 | */ |
||
| 861 | public function getMandateIdentification() |
||
| 865 | |||
| 866 | /** |
||
| 867 | * @param string $creditorIdentifier |
||
| 868 | */ |
||
| 869 | public function setCreditorIdentifier($creditorIdentifier) |
||
| 873 | |||
| 874 | /** |
||
| 875 | * @return string |
||
| 876 | */ |
||
| 877 | public function getCreditorIdentifier() |
||
| 881 | |||
| 882 | /** |
||
| 883 | * @param int $clearingDate |
||
| 884 | */ |
||
| 885 | public function setClearingDate($clearingDate) |
||
| 889 | |||
| 890 | /** |
||
| 891 | * @return int |
||
| 892 | */ |
||
| 893 | public function getClearingDate() |
||
| 897 | |||
| 898 | /** |
||
| 899 | * @param float $clearingAmount |
||
| 900 | */ |
||
| 901 | public function setClearingAmount($clearingAmount) |
||
| 905 | |||
| 906 | /** |
||
| 907 | * @return float |
||
| 908 | */ |
||
| 909 | public function getClearingAmount() |
||
| 913 | } |
||
| 914 |