class ConfigParser

Types config values from the sources Hypervel loads: the application's config files, the framework's config files beneath them, and the package files providers merge.

A package's analysis leaves merged package values unknown, since the applications using the package replace them, and keeps its Testbench application's files and the framework's. The merges and writes the analysis finds widen the composed types. A write it cannot follow, such as one through a local variable in a branch the analysis boot does not run, is not modeled.

Upstream types only the application's files and treats a key no file declares as holding its default.

Properties

Return_> $returns

Methods

__construct(FileHelper $fileHelper, Parser $parser, FileTypeMapper $fileTypeMapper, ScopeFactory $scopeFactory, NodeScopeResolver $nodeScopeResolver, ConfigSourceResolver $configSourceResolver, RuntimeInputs $runtimeInputs)

Create a new parser instance.

array|null
getValue(string $key, Scope $scope)

Get whether a config key is present and its value's type, or null when unknown.

int|null
enterNode(Node $node)

No description

Details

at line 211
__construct(FileHelper $fileHelper, Parser $parser, FileTypeMapper $fileTypeMapper, ScopeFactory $scopeFactory, NodeScopeResolver $nodeScopeResolver, ConfigSourceResolver $configSourceResolver, RuntimeInputs $runtimeInputs)

Create a new parser instance.

Parameters

FileHelper $fileHelper
Parser $parser
FileTypeMapper $fileTypeMapper
ScopeFactory $scopeFactory
NodeScopeResolver $nodeScopeResolver
ConfigSourceResolver $configSourceResolver
RuntimeInputs $runtimeInputs

at line 232
array|null getValue(string $key, Scope $scope)

Get whether a config key is present and its value's type, or null when unknown.

The presence decides whether a lookup's default can apply: a present key returns its value even when it is null, and an absent one returns the default.

Parameters

string $key
Scope $scope

Return Value

array|null

at line 1265
int|null enterNode(Node $node)

No description

Parameters

Node $node

Return Value

int|null