Skip to content

ILegacyConfigHandler

ILegacyConfigHandler is the interface that all old-style config handlers which deal with ConfigValueHolders and parse configs themselves implement.

interface ILegacyConfigHandler

Implemented byConfigHandler
Since1.0.0
SourceConfig/ILegacyConfigHandler.php
MethodDescription
execute(string $config, ?string $context = null): mixedExecute this configuration handler.
initialize(?string $validationFile = null, ?string $parser = null, array<string, mixed> $parameters = []): voidInitialize this ConfigHandler.

abstract public function execute(string $config, ?string $context = null): mixed

Execute this configuration handler.

Name of the executing context (if any).

ParameterTypeDescription
$configstringAn absolute filesystem path to a configuration file.
$context?``stringName of the executing context (if any).

Returns mixed — The declaration to be cached.

ThrowsWhen
UnreadableExceptionIf a requested configuration file does not exist or is not readable.
ParseExceptionIf a requested configuration file is improperly formatted.

abstract public function initialize(?string $validationFile = null, ?string $parser = null, array<string, mixed> $parameters = []): void

Initialize this ConfigHandler.

An associative array of initialization parameters.

ParameterTypeDescription
$validationFile?``stringThe path to a validation file for this config handler.
$parser?``stringThe parser class to use.
$parametersarray``<``string``, ``mixed``>An associative array of initialization parameters.
ThrowsWhen
InitializationExceptionIf an error occurs while initializing the ConfigHandler