SettingRepository
class SettingRepository implements SettingContract
system config Setting Repository
Traits
Key 解析器 解析 key 字串到 namespace, group 和 item.
AppTrait
Properties
protected array | $keyParserCache | 解析的缓存存储 这里的命名方式, 因为是在 trait 中使用 所以这里的缓存的命名前面加上了 trait 的前缀 keyParser |
from KeyParserTrait |
protected Resp | $error | error | from AppTrait |
protected Resp | $success | success | from AppTrait |
Methods
__construct()
No description
bool
delete(string $key)
No description
mixed
get(string $key, null $default = '')
No description
bool
set(string $key, mixed $value = '')
No description
array
getNG(string $ng)
根据命名空间从数据库中获取数据
bool
removeNG(string $ng)
删除命名空间以及分组
void
clear()
No description
Details
in
KeyParserTrait at line 27
KeyParserTrait
setParsedKey(string $key, array $parsed)
根据 key 设置值
in
KeyParserTrait at line 38
bool
keyParserMatch(string $key)
Check Key valid
in
KeyParserTrait at line 52
array
parseKey(string $key)
解析 key 至 namespace, group, and item.
in
KeyParserTrait at line 81
protected array
keyParserParseBasicSegments(array $segments)
解析数值中的基本片段并且返回可用的数组
in
KeyParserTrait at line 103
protected array
keyParserParseSegments(string $key)
解析一系列命名空间的片段
in
AppTrait at line 45
bool
setError(string|MessageBag $error)
设置错误
at line 40
__construct()
No description
at line 52
bool
delete(string $key)
No description
at line 70
mixed
get(string $key, null $default = '')
No description
at line 107
bool
set(string $key, mixed $value = '')
No description
at line 148
array
getNG(string $ng)
根据命名空间从数据库中获取数据
at line 168
bool
removeNG(string $ng)
删除命名空间以及分组
at line 198
void
clear()
No description