1 | <?php |
||
16 | class ISRCreditTransfer extends CreditTransfer |
||
17 | { |
||
18 | /** |
||
19 | * @var ISRParticipant |
||
20 | */ |
||
21 | protected $creditorAccount; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $creditorReference; |
||
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | * |
||
31 | * @param ISRParticipant $creditorAccount ISR participation number of the creditor |
||
32 | * @param string $creditorReference ISR reference number |
||
33 | * |
||
34 | * @throws InvalidArgumentException When the amount is not in EUR or CHF. |
||
35 | */ |
||
36 | 3 | public function __construct($instructionId, $endToEndId, Money\Money $amount, ISRParticipant $creditorAccount, $creditorReference) |
|
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | 1 | public function setRemittanceInformation($remittanceInformation) |
|
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | 2 | public function asDom(DOMDocument $doc, PaymentInformation $paymentInformation) |
|
86 | |||
87 | /** |
||
88 | * {@inheritdoc} |
||
89 | */ |
||
90 | 2 | protected function appendRemittanceInformation(\DOMDocument $doc, \DOMElement $transaction) |
|
104 | |||
105 | /** |
||
106 | * Permit to set optional creditor details |
||
107 | * |
||
108 | * @param string $creditorName |
||
109 | * @param PostalAddressInterface $creditorAddress |
||
110 | */ |
||
111 | 3 | public function setCreditorDetails($creditorName, PostalAddressInterface $creditorAddress) |
|
116 | |||
117 | /** |
||
118 | * Creates Modulo10 recursive check digit |
||
119 | * |
||
120 | * @param string $number Number to create recursive check digit off. |
||
121 | * |
||
122 | * @return int Recursive check digit. |
||
123 | */ |
||
124 | 2 | private static function modulo10($number) |
|
135 | } |
||
136 |
If you have a function call in the test part of a
for
loop, this function is executed on each iteration. Often such a function, can be moved to the initialization part and be cached.