KeyParser

Key Parser trait

 trait Winter\Storm\Support\Traits\KeyParser

Resolves key strings into namespace, group and item. Example: namespace::group.item

Properties

protected $keyParserCache : array

A cache of the parsed items.

Methods

public parseKey (string $key) : array

Parse a key into namespace, group, and item.

Parameters
Property Description
$key
string
Returns
array

public setParsedKey (string $key, array $parsed) : void

Set the parsed value of a key.

Parameters
Property Description
$key
string
$parsed
array
Returns
void

protected keyParserParseBasicSegments (array $segments) : array

Parse an array of basic segments.

Parameters
Property Description
$segments
array
Returns
array

protected keyParserParseSegments (string $key) : array

Parse an array of namespaced segments.

Parameters
Property Description
$key
string
Returns
array
Copyright © 2024 Winter CMS