Skip to content

IPositionAwareConfigHandler

Opt-in, like ISchemaAwareConfigHandler: a handler implements this once it knows how to correlate its own canonical-array key paths back to the elements it read them from.

$positions only ever has entries for elements that survived the merge pipeline untouched (see XmlConfigParser::correlatePosition()) — a handler whose config type has legacy-upgrade stylesheets configured (settings, factories, databases, …) will, in practice, get an empty positions map back for most/all keys; that’s the merge pipeline correctly reporting “no * reliable line available” rather than a bug in the handler.

interface IPositionAwareConfigHandler

Implemented byCachingConfigHandler, CompileConfigHandler, ConfigHandlersConfigHandler, DatabaseConfigHandler, FactoryConfigHandler, MiddlewareConfigHandler, ModuleConfigHandler, OutputTypeConfigHandler, PluginConfigHandler, RbacDefinitionConfigHandler, TestSuitesConfigHandler, TranslationConfigHandler, SecurityConfigHandler
Since1.0.0
SourceConfig/IPositionAwareConfigHandler.php
MethodDescription
toCanonicalArrayWithPositions(XmlConfigDomDocument $document, ElementPositionIndex $positions): array{data: array<mixed>, positions: array<string, array{file: string, line: int}>}

abstract public function toCanonicalArrayWithPositions(XmlConfigDomDocument $document, ElementPositionIndex $positions): array{data: array<mixed>, positions: array<string, array{file: string, line: int}>}

ParameterTypeDescription
$documentXmlConfigDomDocument
$positionsElementPositionIndex

Returns array{data: array<mixed>, positions: array<string, array{file: string, line: int}>}