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#
| Property | Type | Description |
|---|---|---|
$fallbackLocale readonly | string | |
$texts readonly | array<string, array<string, string>> | key => [locale => text] |
Methods#
| Method | Description |
|---|---|
->__construct() | |
->get() | |
->has() |
__construct()#
public function __construct(
array<string, array<string, string>> $texts = [],
string $fallbackLocale = 'en',
)| Parameter | Type | Description |
|---|---|---|
$texts | array<string, array<string, string>> = [] | key => [locale => text] |
$fallbackLocale | string = 'en' |
get()#
public function get(
string $key,
?string $locale = null,
array<string, string> $replace = [],
): ?string| Parameter | Type | Description |
|---|---|---|
$key | string | |
$locale | ?string = null | |
$replace | array<string, string> = [] |
- Returns
?string
has()#
public function has(string $key): bool| Parameter | Type | Description |
|---|---|---|
$key | string |
- Returns
bool