API reference / Quittio \ Laravel \ Support
Settings
final readonly class in quittio/laravel
Quittio\Laravel\Support\Settings · Source
Typed read access to a configuration array ("quittio" by default) with dot notation.
Methods#
| Method | Description |
|---|---|
->__construct() | |
->array() | |
->bool() | |
->get() | |
->int() | |
->nullableString() | |
->section() | |
->string() | |
->strings() |
__construct()#
public function __construct(array<array-key, mixed> $values, string $path = 'quittio')| Parameter | Type | Description |
|---|---|---|
$values | array<array-key, mixed> | |
$path | string = 'quittio' | configuration key of $values, used in error messages |
array()#
public function array(string $key): array<string, mixed>| Parameter | Type | Description |
|---|---|---|
$key | string |
- Returns
array<string, mixed>
bool()#
public function bool(string $key, bool $default): bool| Parameter | Type | Description |
|---|---|---|
$key | string | |
$default | bool |
- Returns
bool
get()#
public function get(string $key, mixed $default = null): mixed| Parameter | Type | Description |
|---|---|---|
$key | string | |
$default | mixed = null |
- Returns
mixed
int()#
public function int(string $key, int $default): int| Parameter | Type | Description |
|---|---|---|
$key | string | |
$default | int |
- Returns
int
nullableString()#
public function nullableString(string $key): ?string| Parameter | Type | Description |
|---|---|---|
$key | string |
- Returns
?string
section()#
public function section(string $key): self| Parameter | Type | Description |
|---|---|---|
$key | string |
- Returns
self
string()#
public function string(string $key, string $default): string| Parameter | Type | Description |
|---|---|---|
$key | string | |
$default | string |
- Returns
string
strings()#
public function strings(string $key): list<string>| Parameter | Type | Description |
|---|---|---|
$key | string |
- Returns
list<string>