From 4e90c44301cdacc85f31259bff887b035a1b9716 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Wed, 19 Nov 2014 12:00:41 +0100 Subject: add postfix add postfix --- lib/private/appframework/routing/routeconfig.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/private/appframework') 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); -- cgit v1.2.3