Skip to content

API reference / Quittio \ Core \ Countries

LegalTextCatalog

final readonly class in quittio/core

Quittio\Core\Countries\LegalTextCatalog · Source

Legal and informational texts of a country pack per locale.

Properties#

PropertyTypeDescription
$fallbackLocale readonlystring
$texts readonlyarray<string, array<string, string>>key => [locale => text]

Methods#

MethodDescription
->__construct()
->get()
->has()

__construct()#

public function __construct(
    array<string, array<string, string>> $texts = [],
    string $fallbackLocale = 'en',
)
ParameterTypeDescription
$textsarray<string, array<string, string>> = []key => [locale => text]
$fallbackLocalestring = 'en'

get()#

public function get(
    string $key,
    ?string $locale = null,
    array<string, string> $replace = [],
): ?string
ParameterTypeDescription
$keystring
$locale?string = null
$replacearray<string, string> = []
Returns
?string

has()#

public function has(string $key): bool
ParameterTypeDescription
$keystring
Returns
bool

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.