summaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Routing
Commit message (Collapse)AuthorAgeFilesLines
* composer run cs:fixCôme Chilliet2023-01-201-1/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Make the route name error more helpfulChristoph Wurst2021-10-222-2/+2
| | | | | | | | As a developer I have no clue what "Invalid route name" means. If the exception gives me a hint I might find it easier to figure out why my route triggers this error. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-043-3/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-182-2/+2
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove unneeded casts that were found by PsalmMorris Jobke2021-01-111-1/+1
| | | | | | In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521) Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-6/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove some IRouter methodsRoeland Jago Douma2020-11-171-4/+4
| | | | | | | | | This is not the end. IRouter needs to burn. But it is a start. 🎵 we didn't start the fire 🎵 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Cleanup route registration logicRoeland Jago Douma2020-11-031-0/+269
| | | | | | | | This was a bunch of cylic things being called. This is an attempt to clean this all up. If an app provides an array of routes. We just parse them and hand them back. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix supporting defaults for routesRoeland Jago Douma2020-07-081-6/+10
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Do not create a RouteActionHandler object for each routeRoeland Jago Douma2020-07-071-7/+4
| | | | | | | | | | This is not required and doesn't allow us to be properly lazy. On top of it this doesnt allow us to cache the routes (since closures/objects can't be cached). This is the first small step into cleaning up the routing we have Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headers for 19Christoph Wurst2020-04-291-2/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix new routing in settings etcRoeland Jago Douma2020-04-221-52/+44
| | | | | | | | | Also prefix resources Unify the prefix handling Handle urls with and without slash Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Extend tests for root urlJoas Schilling2020-04-181-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* PHP CS fixesJoas Schilling2020-04-181-3/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow some apps to have root URLs in their own routing fileJoas Schilling2020-04-181-77/+48
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-6/+6
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use elseif instead of else ifChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-052-2/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-221-2/+2
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make sure urlParams are correctly injected in global routesJoas Schilling2019-03-111-1/+15
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Make RouteConfig strictJoas Schilling2019-01-221-63/+49
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow resources via OCS as wellJoas Schilling2019-01-221-1/+55
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Revert "Match slashes in ../{id} resource routes"Roeland Jago Douma2017-04-181-7/+1
| | | | | | This reverts commit 31f9be7a75712e9f8b7831ed29397527f9fa8baf. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Match slashes in ../{id} resource routesRoeland Jago Douma2017-04-041-1/+7
| | | | | | | | | | Fixes #2954 Before we could match on <prefix>/{id} however if the id contains a / this would not match properly. But since we define the resource routes internally we now make sure that we match all chars (up until the ?). Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Cache the build ControllerNameRoeland Jago Douma2016-09-111-1/+15
| | | | | | | | | Often a route.php file will have many N routes but only M controllers. Where N >= M. Which means that in most cases the ControllerName will be converted multiple times. This is of course far from ideal. Note that this is per app so the cache will contain at most N entries. Which is not to bad.
* Allow ocs/v2.php/cloud/... routesRoeland Jago Douma2016-08-081-1/+7
| | | | | | | | | | | | | | | One of the possibilities of the old OCS API is that you can define the url yourself. This PR makes this possible again by adding an optional root elemenet to the route. Routes are thus: .../ocs/v2.php/<root>/<url> By default <root> = apps/<app> This will allow for example the provisioning API etc to be in ../ovs/v2/php/cloud/users
* Update with robinJoas Schilling2016-07-211-1/+1
|
* Fix othersJoas Schilling2016-07-212-4/+6
|
* Add route testsRoeland Jago Douma2016-07-181-1/+1
|
* Allow registering of OCS routes with the appframeworkRoeland Jago Douma2016-07-181-0/+55
|
* Update license headersLukas Reschke2016-05-262-0/+2
|
* Move \OC\AppFramework to PSR-4Roeland Jago Douma2016-04-222-0/+247
* Also moved the autoloader setup a bit up since we need it in initpaths