diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-07-06 16:00:58 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-11-17 14:08:20 +0100 |
commit | 72a9c35be3dd7a1e54a1ef6a4ed29448a08c1a86 (patch) | |
tree | d9e23247a80262858b0ecb81838db6fcdb3ddd76 /lib/public | |
parent | 5acabcf5cbcb1db92fd9661bc1ed5735ae316323 (diff) | |
download | nextcloud-server-72a9c35be3dd7a1e54a1ef6a4ed29448a08c1a86.tar.gz nextcloud-server-72a9c35be3dd7a1e54a1ef6a4ed29448a08c1a86.zip |
Remove some IRouter methods
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>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/AppFramework/App.php | 5 | ||||
-rw-r--r-- | lib/public/Route/IRouter.php | 75 |
2 files changed, 5 insertions, 75 deletions
diff --git a/lib/public/AppFramework/App.php b/lib/public/AppFramework/App.php index 06d4b36384f..4cbd1f8d32c 100644 --- a/lib/public/AppFramework/App.php +++ b/lib/public/AppFramework/App.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace OCP\AppFramework; use OC\AppFramework\Routing\RouteConfig; +use OC\Route\Router; use OC\ServerContainer; use OCP\Route\IRouter; @@ -146,6 +147,10 @@ class App { * @deprecated 20.0.0 Just return an array from your routes.php */ public function registerRoutes(IRouter $router, array $routes) { + if (!($router instanceof Router)) { + throw new \RuntimeException('Can only setup routes with real router'); + } + $routeConfig = new RouteConfig($this->container, $router, $routes); $routeConfig->register(); } diff --git a/lib/public/Route/IRouter.php b/lib/public/Route/IRouter.php index d837265ac71..cb51cc0b640 100644 --- a/lib/public/Route/IRouter.php +++ b/lib/public/Route/IRouter.php @@ -37,50 +37,6 @@ namespace OCP\Route; interface IRouter { /** - * Get the files to load the routes from - * - * @return string[] - * @since 7.0.0 - * @deprecated 9.0.0 - */ - public function getRoutingFiles(); - - /** - * @return string - * @since 7.0.0 - * @deprecated 9.0.0 - */ - public function getCacheKey(); - - /** - * Loads the routes - * - * @param null|string $app - * @since 7.0.0 - * @deprecated 9.0.0 - */ - public function loadRoutes($app = null); - - /** - * Sets the collection to use for adding routes - * - * @param string $name Name of the collection to use. - * @return void - * @since 7.0.0 - * @deprecated 9.0.0 - */ - public function useCollection($name); - - /** - * returns the current collection name in use for adding routes - * - * @return string the collection name - * @since 8.0.0 - * @deprecated 9.0.0 - */ - public function getCurrentCollection(); - - /** * Create a \OCP\Route\IRoute. * * @param string $name Name of the route to create. @@ -92,35 +48,4 @@ interface IRouter { * @deprecated 9.0.0 */ public function create($name, $pattern, array $defaults = [], array $requirements = []); - - /** - * Find the route matching $url. - * - * @param string $url The url to find - * @throws \Exception - * @return void - * @since 7.0.0 - * @deprecated 9.0.0 - */ - public function match($url); - - /** - * Get the url generator - * - * @since 7.0.0 - * @deprecated 9.0.0 - */ - public function getGenerator(); - - /** - * Generate url based on $name and $parameters - * - * @param string $name Name of the route to use. - * @param array $parameters Parameters for the route - * @param bool $absolute - * @return string - * @since 7.0.0 - * @deprecated 9.0.0 - */ - public function generate($name, $parameters = [], $absolute = false); } |