API Documentation

Config extends Config
in package

An extension of the Laravel Config facade with extra accessors that ensure the types of the returned values.

Tags
see
Repository
see
Config

Table of Contents

Methods

getArray()  : array<string|int, mixed>
getBool()  : bool
getFloat()  : float
getInt()  : int
getNullableString()  : string|null
getString()  : string
validated()  : mixed

Methods

getArray()

public static getArray(string $key[, array<string|int, mixed> $default = null ]) : array<string|int, mixed>
Parameters
$key : string
$default : array<string|int, mixed> = null
Return values
array<string|int, mixed>

getBool()

public static getBool(string $key[, bool $default = null ]) : bool
Parameters
$key : string
$default : bool = null
Return values
bool

getFloat()

public static getFloat(string $key[, float $default = null ]) : float
Parameters
$key : string
$default : float = null
Return values
float

getInt()

public static getInt(string $key[, int $default = null ]) : int
Parameters
$key : string
$default : int = null
Return values
int

getNullableString()

public static getNullableString(string $key[, string $default = null ]) : string|null
Parameters
$key : string
$default : string = null
Tags
experimental

Could possibly be merged by allowing null returns if default is null? Preferably with generics so the type is matched by IDE support.

Return values
string|null

getString()

public static getString(string $key[, string $default = null ]) : string
Parameters
$key : string
$default : string = null
Return values
string

validated()

protected static validated(mixed $value, string $type, string $key) : mixed
Parameters
$value : mixed
$type : string
$key : string

        
On this page

Search results