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:

http://my_cdm_server/dm/objects/uw/52

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.

It is not possible to override a built-in route - that is, to respond to a route that a built-in controller already responds to. Any routes that a module attempts to override will simply continue to work as if the module were not active.