summaryrefslogtreecommitdiffstats
path: root/lib/private/appframework
diff options
context:
space:
mode:
authorPatrick Paysant <ppaysant@linagora.com>2014-09-07 12:20:48 +0200
committerPatrick Paysant <ppaysant@linagora.com>2014-09-09 23:00:29 +0200
commitcb5416b798a9fde6d4826ad82b1f846b88a1ffcd (patch)
tree513680cedbb69abc2c26711af294df858b99bfb1 /lib/private/appframework
parentcd94b54be3676a2be772ef76c39ad706ff3eb947 (diff)
downloadnextcloud-server-cb5416b798a9fde6d4826ad82b1f846b88a1ffcd.tar.gz
nextcloud-server-cb5416b798a9fde6d4826ad82b1f846b88a1ffcd.zip
Allow default values for route parameters.
Diffstat (limited to 'lib/private/appframework')
-rw-r--r--lib/private/appframework/routing/routeconfig.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/appframework/routing/routeconfig.php b/lib/private/appframework/routing/routeconfig.php
index 5b4d411a355..91687b9c83c 100644
--- a/lib/private/appframework/routing/routeconfig.php
+++ b/lib/private/appframework/routing/routeconfig.php
@@ -93,6 +93,12 @@ class RouteConfig {
if(array_key_exists('requirements', $simpleRoute)) {
$router->requirements($simpleRoute['requirements']);
}
+
+ // optionally register defaults for route. This is used to
+ // tell the route parser how url parameters should be default valued
+ if(array_key_exists('defaults', $simpleRoute)) {
+ $router->defaults($simpleRoute['defaults']);
+ }
}
}