From 0a674ddb65a2607745eb1595ffaa150bcbdfb2b3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Wed, 1 Oct 2014 16:32:57 +0200 Subject: [PATCH] add getRoutes()-methode For a WCF2.1 plugin I need all the routes, which are registered. Since it's not possible to directly access the routes as a plugin, I would propose, for introducing a method. --- .../files/lib/system/request/RouteHandler.class.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wcfsetup/install/files/lib/system/request/RouteHandler.class.php b/wcfsetup/install/files/lib/system/request/RouteHandler.class.php index 741a1de0fc..89718344d1 100644 --- a/wcfsetup/install/files/lib/system/request/RouteHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RouteHandler.class.php @@ -103,6 +103,15 @@ class RouteHandler extends SingletonFactory { array_unshift($this->routes, $route); } + /** + * Returns all registered routes. + * + * @return array<\wcf\system\request\Route> + **/ + public function getRoutes() { + return $this->routes; + } + /** * Returns true if a route matches. Please bear in mind, that the * first route which is able to consume all path components is used, -- 2.20.1