October\Rain\Support\Traits\KeyParser

Source: ~/vendor/october/rain/src/Support/Traits/KeyParser.php

Key Parser trait

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

Protected properties

protected array $keyParserCache

A cache of the parsed items.

Public methods

public array parseKey(string $key)

Parse a key into namespace, group, and item.

Parameters
  • string $key

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

Set the parsed value of a key.

Parameters
  • string $key
  • array $parsed

Protected methods

protected array keyParserParseBasicSegments(array $segments)

Parse an array of basic segments.

Parameters
  • array $segments

protected array keyParserParseSegments(string $key)

Parse an array of namespaced segments.

Parameters
  • string $key