API reference / Quittio \ Country \ CH \ QrBill
CreditorReference
final class in quittio/country-ch
Quittio\Country\CH\QrBill\CreditorReference · Source
The Creditor Reference of ISO 11649: "RF", two check digits (modulo 97-10) and up to 21 letters and digits. It goes with an ordinary IBAN in the Swiss QR bill.
Methods#
| Method | Description |
|---|---|
::format() | The reference in blocks of four for printing. |
::fromCharactersOf() | The Creditor Reference of the letters and digits of $value, e.g. of an invoice number; null without any or with more than 21. |
::isValid() | Whether $reference (spaces allowed, any case) is a Creditor Reference with correct check digits. |
format()#
public static function format(string $reference): stringThe reference in blocks of four for printing.
| Parameter | Type | Description |
|---|---|---|
$reference | string |
- Returns
string
fromCharactersOf()#
public static function fromCharactersOf(string $value): ?stringThe Creditor Reference of the letters and digits of $value, e.g. of an invoice number; null without any or with more than 21.
| Parameter | Type | Description |
|---|---|---|
$value | string |
- Returns
?string
isValid()#
public static function isValid(string $reference): boolWhether $reference (spaces allowed, any case) is a Creditor Reference with correct check digits.
| Parameter | Type | Description |
|---|---|---|
$reference | string |
- Returns
bool