From: Joshua Rüsweg Date: Wed, 1 Oct 2014 14:32:57 +0000 (+0200) Subject: add getRoutes()-methode X-Git-Tag: 2.1.0_Alpha_1~287^2^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0a674ddb65a2607745eb1595ffaa150bcbdfb2b3;p=GitHub%2FWoltLab%2FWCF.git 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. --- 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,