diff options
author | Bernhard Posselt <Raydiation@users.noreply.github.com> | 2014-09-09 23:40:46 +0200 |
---|---|---|
committer | Bernhard Posselt <Raydiation@users.noreply.github.com> | 2014-09-09 23:40:46 +0200 |
commit | ba698a4942ba3db13069c73aba5eb610c74604f9 (patch) | |
tree | 7564831f1272b402dbcc3d9f335d6b2c4d2950ca /lib | |
parent | c3d90b96c8ec4bcf96e28c6ccdb194494888cc61 (diff) | |
parent | cb5416b798a9fde6d4826ad82b1f846b88a1ffcd (diff) | |
download | nextcloud-server-ba698a4942ba3db13069c73aba5eb610c74604f9.tar.gz nextcloud-server-ba698a4942ba3db13069c73aba5eb610c74604f9.zip |
Merge pull request #10972 from ppaysant/routes-defaults
Allow default values for route parameters.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/appframework/routing/routeconfig.php | 6 |
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']); + } } } |