summaryrefslogtreecommitdiffstats
path: root/lib/private/appframework
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-11-19 12:00:41 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2014-11-19 12:01:42 +0100
commit4e90c44301cdacc85f31259bff887b035a1b9716 (patch)
tree5abe28a9242dbc4b5461d1ec1e2cffa2316c8fd3 /lib/private/appframework
parent91f7c0af6e627532efa2161e9ca7838d28dc42a9 (diff)
downloadnextcloud-server-4e90c44301cdacc85f31259bff887b035a1b9716.tar.gz
nextcloud-server-4e90c44301cdacc85f31259bff887b035a1b9716.zip
add postfix
add postfix
Diffstat (limited to 'lib/private/appframework')
-rw-r--r--lib/private/appframework/routing/routeconfig.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/appframework/routing/routeconfig.php b/lib/private/appframework/routing/routeconfig.php
index 91687b9c83c..9816b062b8d 100644
--- a/lib/private/appframework/routing/routeconfig.php
+++ b/lib/private/appframework/routing/routeconfig.php
@@ -69,6 +69,12 @@ class RouteConfig {
$simpleRoutes = isset($routes['routes']) ? $routes['routes'] : array();
foreach ($simpleRoutes as $simpleRoute) {
$name = $simpleRoute['name'];
+ $postfix = '';
+
+ if (isset($simpleRoute['postfix'])) {
+ $postfix = $simpleRoute['postfix'];
+ }
+
$url = $simpleRoute['url'];
$verb = isset($simpleRoute['verb']) ? strtoupper($simpleRoute['verb']) : 'GET';
@@ -84,7 +90,7 @@ class RouteConfig {
// register the route
$handler = new RouteActionHandler($this->container, $controllerName, $actionName);
- $router = $this->router->create($this->appName.'.'.$controller.'.'.$action, $url)
+ $router = $this->router->create($this->appName.'.'.$controller.'.'.$action . $postfix, $url)
->method($verb)
->action($handler);