KeyParserTrait
trait KeyParserTrait
Key 解析器 解析 key 字串到 namespace, group 和 item.
PS: namespace::group.item
Properties
protected array | $keyParserCache | 解析的缓存存储 这里的命名方式, 因为是在 trait 中使用 所以这里的缓存的命名前面加上了 trait 的前缀 keyParser |
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)
解析一系列命名空间的片段
Details
at line 27
KeyParserTrait
setParsedKey(string $key, array $parsed)
根据 key 设置值
at line 38
bool
keyParserMatch(string $key)
Check Key valid
at line 52
array
parseKey(string $key)
解析 key 至 namespace, group, and item.
at line 81
protected array
keyParserParseBasicSegments(array $segments)
解析数值中的基本片段并且返回可用的数组
at line 103
protected array
keyParserParseSegments(string $key)
解析一系列命名空间的片段