lucee.Componentcoldbox.system.web.services.BaseService
coldbox.system.web.services.RoutingService
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- This service is in charge of URL routing in ColdBox
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any<Router>
|
router
A ColdBox Router this routing service configures with.
|
true
|
false
|
Constructor Summary | |
---|---|
init(any controller)
Constructor. |
Method Summary | |
---|---|
private any
|
checkForInvalidURL(any route, any script_name, any event)
Check for invalid URL's. |
private any
|
detectExtension(any requestString, any event)
Detect extensions from the incoming request. |
private any
|
findConventionNameValuePairs(string requestString, any match, struct params)
Find the convention name value pairs in the incoming request string, if found, we will incorporate them into the incoming `params` arguments. |
struct
|
findRoute(any action, any event, [any module=''], [any namespace=''], [any domain=''])
Figures out which route matches this request and returns a routed structure containing. |
private any
|
fixIISURLVars(any requestString, any rc)
Clean up some IIS funkyness where query string is found in the path info. |
any
|
getCgiElement(any cgiElement, any event)
The cgi element facade method, created so we can do useful mocking. |
private any
|
getCleanedPaths(any rc, any event)
Get and Clean the path_info and script names structure. |
string
|
getRouter()
|
private any
|
loadRouter()
Load a ColdBox Router CFC or a legacy router CFM template. |
any
|
onConfigurationLoad()
Once configuration loads prepare for operation. |
any
|
onMissingMethod([any missingMethodName], [any missingMethodArguments='[runtime expression]'])
Passthrough for legacy support of calling Router methods. |
private any
|
packageResolver(any routingString, any routeParams, [any module=''])
Resolve handler/module packages. |
private any
|
processRedirect(any routeResults, any event)
Process a route redirection. |
any
|
processRoute(struct routeResults, any event, any rc, any prc)
Process a route result to be used by the request. |
private any
|
renderResponse(any route, any event)
Render a RESTFul response. |
void
|
requestCapture(any event)
This is the route dispatcher called upon the request is captured. |
private any
|
serializeURL([any formVars=''], any event)
Serialize a URL when invalid. |
any
|
setRouter(any router)
|
Methods inherited from class coldbox.system.web.services.BaseService |
---|
getController, onShutdown, setController |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
controller
Property Detail |
---|
A ColdBox Router this routing service configures with.
access
- publicrequired
- falsereturntype
- anydoc_generic
- coldbox.system.web.routing.Routerserializable
- trueMethod Detail |
---|
Check for invalid URL's
route
- The incoming routescript_name
- The cgi script nameevent
- The event objectDetect extensions from the incoming request
requestString
- The incoming request stringevent
- The event objectFind the convention name value pairs in the incoming request string, if found, we will incorporate them into the incoming `params` arguments
requestString
- the incoming request stringmatch
- The regex matcher objectparams
- The incoming parameter structFigures out which route matches this request and returns a routed structure containing the `route` it discovered or an empty structure and the `params` structure which represents URL placeholders, convention name value pairs, matching variables, etc.
action
- The action evaluated by path_infoevent
- The event objectmodule
- Incoming modulenamespace
- Incoming namespacedomain
- Incoming domainClean up some IIS funkyness where query string is found in the path info. We basically clean it up and add the query string into the RC scope
requestString
- the incoming request stringrc
- The request collection structThe cgi element facade method, created so we can do useful mocking
cgiElement
- The element to take from CGIevent
- The request context objectGet and Clean the path_info and script names structure
rc
- The incoming request collectionevent
- The event objectLoad a ColdBox Router CFC or a legacy router CFM template.
Once configuration loads prepare for operation
onConfigurationLoad
in class
BaseService
Passthrough for legacy support of calling Router methods. This will be removed in future versions.
missingMethodName
missingMethodArguments
Resolve handler/module packages
routingString
- The incoming routing stringrouteParams
- The incoming route parametersmodule
- Module route or notProcess a route redirection
routeResults
- The { params, route } that matchedevent
- The request contextProcess a route result to be used by the request
routeResults
- The route results a findRoute()
method returnsevent
- The ColdBox Request contextrc
- The requset collectionprc
- The private request collectionRender a RESTFul response
route
- The route responseevent
- The event objectThis is the route dispatcher called upon the request is captured.
event
- The ColdBox Request contextSerialize a URL when invalid
formVars
- The incoming form variablesevent
- The event objectrouter