Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dbp-relay-core-bundle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
digital blueprint
Relay API Gateway
dbp-relay-core-bundle
Commits
49ded510
Commit
49ded510
authored
2 years ago
by
Groß-Vogt, Tobias
Browse files
Options
Downloads
Patches
Plain Diff
localdatapreevent: replace acknowledgeQueryParameter function by tryPopPendingQueryParameter
parent
f0ef68de
No related branches found
No related tags found
No related merge requests found
Pipeline
#230881
passed
2 years ago
Stage: test
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/LocalData/AbstractLocalDataEventSubscriber.php
+2
-2
2 additions, 2 deletions
src/LocalData/AbstractLocalDataEventSubscriber.php
src/LocalData/LocalDataPreEvent.php
+6
-2
6 additions, 2 deletions
src/LocalData/LocalDataPreEvent.php
with
8 additions
and
4 deletions
src/LocalData/AbstractLocalDataEventSubscriber.php
+
2
−
2
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
)
{
}
...
...
This diff is collapsed.
Click to expand it.
src/LocalData/LocalDataPreEvent.php
+
6
−
2
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment