CountryRegistry
in package
FinalYes
Installed country packs.
Table of Contents
Methods
- __construct() : mixed
- all() : array<string, CountryPack>
- get() : CountryPack|null
- getOrGeneric() : CountryPack
- Returns the installed pack or a generic pack for the country.
- has() : bool
- register() : self
- taxPreset() : TaxPreset|null
- The tax preset with this key from the presets of the installed packs, e.g. "de.standard".
Methods
__construct()
public
__construct([iterable<string|int, CountryPack> $packs = [] ]) : mixed
Parameters
- $packs : iterable<string|int, CountryPack> = []
all()
public
all() : array<string, CountryPack>
Return values
array<string, CountryPack>get()
public
get(string $code) : CountryPack|null
Parameters
- $code : string
Return values
CountryPack|nullgetOrGeneric()
Returns the installed pack or a generic pack for the country.
public
getOrGeneric(string $code) : CountryPack
Parameters
- $code : string
Return values
CountryPackhas()
public
has(string $code) : bool
Parameters
- $code : string
Return values
boolregister()
public
register(CountryPack $pack) : self
Parameters
- $pack : CountryPack
Return values
selftaxPreset()
The tax preset with this key from the presets of the installed packs, e.g. "de.standard".
public
taxPreset(string $key) : TaxPreset|null
Parameters
- $key : string