diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-07-30 20:48:03 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-08-10 23:03:19 +0200 |
commit | 9e80f0954d45465dfba261c5b5a501e77eb595c9 (patch) | |
tree | dddacdfd428ded4782067ddf0495dd5ce0dd99a1 /lib/router.php | |
parent | b3848581bf5f77008a71cf79ba6e3d61b33baed6 (diff) | |
download | nextcloud-server-9e80f0954d45465dfba261c5b5a501e77eb595c9.tar.gz nextcloud-server-9e80f0954d45465dfba261c5b5a501e77eb595c9.zip |
Add loading of routes in OC_Router
Diffstat (limited to 'lib/router.php')
-rw-r--r-- | lib/router.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/router.php b/lib/router.php index f037ecdfef4..4b6b076e21b 100644 --- a/lib/router.php +++ b/lib/router.php @@ -16,6 +16,19 @@ class OC_Router { protected $collections = array(); protected $collection = null; + /** + * loads the api routes + */ + public function loadRoutes(){ + // TODO cache + foreach(OC_APP::getEnabledApps() as $app){ + $file = OC_App::getAppPath($app).'/appinfo/routes.php'; + if(file_exists($file)){ + require_once($file); + } + } + } + public function useCollection($name) { if (!isset($this->collections[$name])) { $this->collections[$name] = new RouteCollection(); |