Adding a mechanism for extending routes, a=chris

Chris Pollett [2015-08-05 23:Aug:th]
Adding a mechanism for extending routes, a=chris
Filename
src/index.php
diff --git a/src/index.php b/src/index.php
index 58edfb303..790584d40 100755
--- a/src/index.php
+++ b/src/index.php
@@ -37,6 +37,7 @@ namespace seekquarry\yioop;

 use seekquarry\yioop\configs as C;
 use seekquarry\yioop\library as L;
+use seekquarry\yioop\library\Routes;

 /**
  * Main entry point to the Yioop web app.
@@ -173,6 +174,9 @@ function configureRewrites()
         'user' => 'routeFeeds',
         'p' => 'routeWiki'
     ];
+    if(class_exists("Routes")) {
+        $route_map = array_merge($route_map, Routes::getRoutes());
+    }
     /**
      * Check for paths of the form index.php/something which yioop doesn't
      * support
ViewGit