SysConfig
class SysConfig extends Model mixin Eloquent
系统设置
Traits
Key 解析器 解析 key 字串到 namespace, group 和 item.
Constants
STR_YES |
|
STR_NO |
|
YES |
|
NO |
|
ENABLE |
|
DISABLE |
|
MIN_DEBUG |
|
MIN_ONE_HOUR |
|
MIN_SIX_HOUR |
|
MIN_HALF_DAY |
|
MIN_ONE_DAY |
|
MIN_HALF_WEEK |
|
MIN_ONE_WEEK |
|
MIN_ONE_MONTH |
|
Properties
protected array | $keyParserCache | 解析的缓存存储 这里的命名方式, 因为是在 trait 中使用 所以这里的缓存的命名前面加上了 trait 的前缀 keyParser |
from KeyParserTrait |
$timestamps | |||
protected | $table | ||
protected | $fillable | ||
int | $id | 配置id | |
string | $namespace | 命名空间 | |
string | $group | 配置分组 | |
string | $item | 配置名称 | |
string | $value | 配置值 | |
string | $description | 配置介绍 |
Methods
Builder
scopeApplyKey(Builder $query, string $key)
Scope to find a setting record for the specified module (or plugin) name and setting name.
static array|string
kvYn(null $key = null)
No description
static array|bool|string
kvStrYn(null $key = null)
字符来标识 YN
static array|string
kvEnable(null $key = null)
禁用/启用
static mixed
tableExists(string $table)
检测表是否存在
static SysConfig
applyKey(mixed $key)
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)
解析一系列命名空间的片段
at line 68
Builder
scopeApplyKey(Builder $query, string $key)
Scope to find a setting record for the specified module (or plugin) name and setting name.
at line 83
static array|string
kvYn(null $key = null)
No description
at line 98
static array|bool|string
kvStrYn(null $key = null)
字符来标识 YN
at line 113
static array|string
kvEnable(null $key = null)
禁用/启用
at line 128
static mixed
tableExists(string $table)
检测表是否存在
at line 25
static SysConfig
applyKey(mixed $key)
No description