프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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 |