Skip to content
......@@ -109,7 +109,7 @@ abstract class AbstractLocalDataEventSubscriber extends AbstractAuthorizationSer
}
$sourceAttributeName = $attributeMapEntry[self::SOURCE_ATTRIBUTE_KEY];
$localQueryParameters[$sourceAttributeName] = $localDataAttributeValue;
$event->acknowledgeQueryParameter($localDataAttributeName);
$event->tryPopPendingQueryParameter($localDataAttributeName);
}
}
......@@ -182,7 +182,7 @@ abstract class AbstractLocalDataEventSubscriber extends AbstractAuthorizationSer
throw new \RuntimeException(sprintf('child classes must implement the \'%s\' method', __METHOD__));
}
protected function onPreEvent(LocalDataPreEvent $preEvent, array $localQueryParameters)
protected function onPreEvent(LocalDataPreEvent $preEvent, array $mappedQueryParameters)
{
}
......
......@@ -30,9 +30,13 @@ class LocalDataPreEvent extends Event
return $this->queryParametersIn;
}
public function acknowledgeQueryParameter(string $queryParameterName): void
public function tryPopPendingQueryParameter(string $queryParameterName, &$queryParameterValue = null): bool
{
unset($this->queryParametersIn[$queryParameterName]);
if (($queryParameterValue = $this->queryParametersIn[$queryParameterName] ?? null) !== null) {
unset($this->queryParametersIn[$queryParameterName]);
}
return $queryParameterValue !== null;
}
public function getOptions(): array
......