Skip to content
Snippets Groups Projects
Commit 9e80f095 authored by Bart Visscher's avatar Bart Visscher
Browse files

Add loading of routes in OC_Router

parent b3848581
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,19 @@ class OC_Router { ...@@ -16,6 +16,19 @@ class OC_Router {
protected $collections = array(); protected $collections = array();
protected $collection = null; 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) { public function useCollection($name) {
if (!isset($this->collections[$name])) { if (!isset($this->collections[$name])) {
$this->collections[$name] = new RouteCollection(); $this->collections[$name] = new RouteCollection();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment