API reference / Quittio \ Country \ DE \ Support
LeitwegId
final class in quittio/country-de
Quittio\Country\DE\Support\LeitwegId · Source
Leitweg-ID of public buyers in Germany (BT-10 for XRechnung): coarse address (2–12 digits), optional fine address (up to 30 characters) and check digits according to ISO 7064 Mod 97-10.
Methods#
| Method | Description |
|---|---|
::checkDigits() | The two check digits (ISO 7064 MOD 97-10) of a Leitweg-ID, computed over the coarse and the fine address concatenated without the dash, e.g. checkDigits('04011000'.'1234512345'). |
::isValid() | Whether the value is a Leitweg-ID with correct check digits. |
::looksLike() | Whether the value has the shape of a Leitweg-ID (coarse address, optional fine address, two check digits, separated by dashes), whatever its check digits. |
checkDigits()#
public static function checkDigits(string $address): stringThe two check digits (ISO 7064 MOD 97-10) of a Leitweg-ID, computed over the coarse and the fine address concatenated without the dash, e.g. checkDigits('04011000'.'1234512345').
| Parameter | Type | Description |
|---|---|---|
$address | string |
- Returns
string
isValid()#
public static function isValid(?string $value): boolWhether the value is a Leitweg-ID with correct check digits.
| Parameter | Type | Description |
|---|---|---|
$value | ?string |
- Returns
bool
looksLike()#
public static function looksLike(?string $value): boolWhether the value has the shape of a Leitweg-ID (coarse address, optional fine address, two check digits, separated by dashes), whatever its check digits.
| Parameter | Type | Description |
|---|---|---|
$value | ?string |
- Returns
bool