Skip to content
Snippets Groups Projects
Commit b1590960 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by David Siegfried
Browse files

fix property access, fixes #1297

Closes #1297

Merge request studip/studip!794
parent eff66488
No related branches found
No related tags found
No related merge requests found
......@@ -199,10 +199,10 @@ abstract class RouteMap
* Initializes the route map by binding it to a router and passing in
* the current route.
*
* @param RESTAPI\Router $router Router to bind this route map to
* @param Array $route The matched route out of
* Router::matchRoute; an array with keys
* 'handler', 'conditions' and 'source'
* @param Router $router Router to bind this route map to
* @param array $route The matched route out of Router::matchRoute;
* an array with keys 'handler', 'conditions' and
* 'source'
*/
public function init($router, $route)
{
......@@ -1039,4 +1039,13 @@ abstract class RouteMap
return $conditions;
}
/**
* Returns the response object
* @return Response
*/
public function getResponse(): Response
{
return $this->response;
}
}
......@@ -458,10 +458,10 @@ class Router
* Takes a route and the parameters out of the requested path and
* executes the handler of the route.
*
* @param Array $route the matched route out of
* @param array $route the matched route out of
* Router::matchRoute; an array with keys
* 'handler', 'conditions' and 'source'
* @param Array $parameters the matched parameters out of
* @param array $parameters the matched parameters out of
* Router::matchRoute; something like:
* `array('user_id' => '23a21d...e78f')`
* @return Response the resulting Response object which is then
......@@ -496,7 +496,7 @@ class Router
$handler[0]->after($this, $parameters);
}
return $handler[0]->response;
return $handler[0]->getResponse();
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment