Свойство | Тип | Описание | |
---|---|---|---|
$cache | |||
$cachePrefix | |||
$setting |
Метод | Описание | |
---|---|---|
__construct ( |
SettingService constructor. | |
get ( $key, string | boolean $default = false ) : boolean | string | Gets a setting from the database, If not found, Returns default, Which is false by default. | |
has ( $key ) : boolean | Checks if a setting exists. | |
put ( $key, $value ) : boolean | Add a setting to the database. | |
remove ( $key ) : boolean | Removes a setting from the database. |
Метод | Описание | |
---|---|---|
clearFromCache ( $key ) | Clear an item from the cache completely. | |
formatValue ( $value, $default ) : mixed | Format a settings value | |
getOverrideValue ( $key ) : boolean | null | Returns an override value for a setting based on certain app conditions. | |
getSettingObjectByKey ( $key ) : mixed | Gets a setting model from the database for the given key. | |
getValueFromStore ( $key, $default ) : mixed | Gets a setting value from the cache or database. |
public __construct ( |
||
$setting | ||
$cache | Illuminate\Contracts\Cache\Repository |
protected clearFromCache ( $key ) | ||
$key |
protected formatValue ( $value, $default ) : mixed | ||
$value | ||
$default | ||
Результат | mixed |
protected getOverrideValue ( $key ) : boolean | null | ||
$key | ||
Результат | boolean | null |
protected getSettingObjectByKey ( $key ) : mixed | ||
$key | ||
Результат | mixed |
protected getValueFromStore ( $key, $default ) : mixed | ||
$key | ||
$default | ||
Результат | mixed |