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

setParsedKey(string $key, array $parsed)

根据 key 设置值

bool
keyParserMatch(string $key)

Check Key valid

array
parseKey(string $key)

解析 key 至 namespace, group, and item.

array
keyParserParseBasicSegments(array $segments)

解析数值中的基本片段并且返回可用的数组

array
keyParserParseSegments(string $key)

解析一系列命名空间的片段

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 设置值

Parameters

string $key key
array $parsed parsed

Return Value

KeyParserTrait

in KeyParserTrait at line 38
bool keyParserMatch(string $key)

Check Key valid

Parameters

string $key key

Return Value

bool

in KeyParserTrait at line 52
array parseKey(string $key)

解析 key 至 namespace, group, and item.

Parameters

string $key key

Return Value

array

in KeyParserTrait at line 81
protected array keyParserParseBasicSegments(array $segments)

解析数值中的基本片段并且返回可用的数组

Parameters

array $segments segments

Return Value

array

in KeyParserTrait at line 103
protected array keyParserParseSegments(string $key)

解析一系列命名空间的片段

Parameters

string $key key

Return Value

array

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.

Parameters

Builder $query query
string $key

Specifies the setting key value, for example 'system:updates.check'

Return Value

Builder

at line 83
static array|string kvYn(null $key = null)

No description

Parameters

null $key key

Return Value

array|string

at line 98
static array|bool|string kvStrYn(null $key = null)

字符来标识 YN

Parameters

null $key

Return Value

array|bool|string

at line 113
static array|string kvEnable(null $key = null)

禁用/启用

Parameters

null $key key

Return Value

array|string

at line 128
static mixed tableExists(string $table)

检测表是否存在

Parameters

string $table 检测的表的名称

Return Value

mixed

at line 25
static SysConfig applyKey(mixed $key)

No description

Parameters

mixed $key

Return Value

SysConfig