Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marcus Eibrink-Lunzenauer
Stud.IP
Commits
b1590960
Commit
b1590960
authored
2 years ago
by
Jan-Hendrik Willms
Committed by
David Siegfried
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix property access, fixes #1297
Closes #1297 Merge request
studip/studip!794
parent
eff66488
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/classes/restapi/RouteMap.php
+13
-4
13 additions, 4 deletions
lib/classes/restapi/RouteMap.php
lib/classes/restapi/Router.php
+3
-3
3 additions, 3 deletions
lib/classes/restapi/Router.php
with
16 additions
and
7 deletions
lib/classes/restapi/RouteMap.php
+
13
−
4
View file @
b1590960
...
@@ -199,10 +199,10 @@ abstract class RouteMap
...
@@ -199,10 +199,10 @@ abstract class RouteMap
* Initializes the route map by binding it to a router and passing in
* Initializes the route map by binding it to a router and passing in
* the current route.
* the current route.
*
*
* @param
RESTAPI\
Router $router Router to bind this route map to
* @param Router $router Router to bind this route map to
* @param
A
rray
$route The matched route out of
* @param
a
rray $route
The matched route out of
Router::matchRoute;
*
Router::matchRoute; an array with keys
*
an array with keys 'handler', 'conditions' and
*
'handler', 'conditions' and
'source'
* 'source'
*/
*/
public
function
init
(
$router
,
$route
)
public
function
init
(
$router
,
$route
)
{
{
...
@@ -1039,4 +1039,13 @@ abstract class RouteMap
...
@@ -1039,4 +1039,13 @@ abstract class RouteMap
return
$conditions
;
return
$conditions
;
}
}
/**
* Returns the response object
* @return Response
*/
public
function
getResponse
():
Response
{
return
$this
->
response
;
}
}
}
This diff is collapsed.
Click to expand it.
lib/classes/restapi/Router.php
+
3
−
3
View file @
b1590960
...
@@ -458,10 +458,10 @@ class Router
...
@@ -458,10 +458,10 @@ class Router
* Takes a route and the parameters out of the requested path and
* Takes a route and the parameters out of the requested path and
* executes the handler of the route.
* executes the handler of the route.
*
*
* @param
A
rray $route the matched route out of
* @param
a
rray $route the matched route out of
* Router::matchRoute; an array with keys
* Router::matchRoute; an array with keys
* 'handler', 'conditions' and 'source'
* 'handler', 'conditions' and 'source'
* @param
A
rray $parameters the matched parameters out of
* @param
a
rray $parameters the matched parameters out of
* Router::matchRoute; something like:
* Router::matchRoute; something like:
* `array('user_id' => '23a21d...e78f')`
* `array('user_id' => '23a21d...e78f')`
* @return Response the resulting Response object which is then
* @return Response the resulting Response object which is then
...
@@ -496,7 +496,7 @@ class Router
...
@@ -496,7 +496,7 @@ class Router
$handler
[
0
]
->
after
(
$this
,
$parameters
);
$handler
[
0
]
->
after
(
$this
,
$parameters
);
}
}
return
$handler
[
0
]
->
r
esponse
;
return
$handler
[
0
]
->
getR
esponse
()
;
}
}
/**
/**
...
...
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