Skip to content
GitLab
Explore
Sign in
This is an archived project. Repository and other project resources are read-only.
Commits on Source (1)
localdatapreevent: replace acknowledgeQueryParameter function by tryPopPendingQueryParameter
· 49ded510
Groß-Vogt, Tobias
authored
Feb 06, 2023
49ded510
Hide whitespace changes
Inline
Side-by-side
src/LocalData/AbstractLocalDataEventSubscriber.php
View file @
49ded510
...
...
@@ -109,7 +109,7 @@ abstract class AbstractLocalDataEventSubscriber extends AbstractAuthorizationSer
}
$sourceAttributeName
=
$attributeMapEntry
[
self
::
SOURCE_ATTRIBUTE_KEY
];
$localQueryParameters
[
$sourceAttributeName
]
=
$localDataAttributeValue
;
$event
->
acknowledge
QueryParameter
(
$localDataAttributeName
);
$event
->
tryPopPending
QueryParameter
(
$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
$
local
QueryParameters
)
protected
function
onPreEvent
(
LocalDataPreEvent
$preEvent
,
array
$
mapped
QueryParameters
)
{
}
...
...
src/LocalData/LocalDataPreEvent.php
View file @
49ded510
...
...
@@ -30,9 +30,13 @@ class LocalDataPreEvent extends Event
return
$this
->
queryParametersIn
;
}
public
function
acknowledge
QueryParameter
(
string
$queryParameterName
):
void
public
function
tryPopPending
QueryParameter
(
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
...
...