Exposing URI routes

If a module is to expose its own URI routes, it needs a way to tell dmBridge what URI routes those are. A "route" is the portion of the URI that dmBridge uses to figure out what to do. For example, in the following URI:


The route is objects/uw/52. When dmBridge sees a URI matching this pattern, its own built-in routes.xml file tells it to invoke DMTEObjectController::view(), passing in an ID of 52 as a method parameter. (Take a look at dm/includes/routes.xml to see how this works. A module's routes.xml file should be structured the same way.)

Every route in a module's routes.xml file needs to be mapped to a class instance method. The class in question is typically a custom controller class provided by the module.

When the dmBridge system searches for a route, it will look for module-provided routes first. Still, modules should strongly avoid overriding built-in routes.