Skip to content

Commit 0a86e7a

Browse files
committed
COLDBOX-1356 #resolve
Removeal of Router.with() and endWith() in favor of the group() closures.
1 parent e4063cd commit 0a86e7a

File tree

2 files changed

+0
-73
lines changed

2 files changed

+0
-73
lines changed

system/web/routing/Router.cfc

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -441,66 +441,6 @@ component
441441
/* ROUTE REGISTRATION METHODS */
442442
/****************************************************************************************************************************/
443443

444-
/**
445-
*
446-
* Starts a with closure, where all arguments will be prefixed for the next concatenated addRoute() methods until an endWith() is called
447-
*
448-
* @deprecated This has been deprecated in favor of the <code>group()</code> function.
449-
* @pattern The pattern to match against the URL.
450-
* @handler The handler to execute if pattern matched.
451-
* @action The action in a handler to execute if a pattern is matched. This can also be a structure based on the HTTP method(GET,POST,PUT,DELETE). ex: {GET:'show', PUT:'update', DELETE:'delete', POST:'save'}
452-
* @packageResolverExempt If this is set to true, then the interceptor will not try to do handler package resolving. Else a package will always be resolved. Only works if :handler is in a pattern
453-
* @matchVariables A string of name-value pair variables to add to the request collection when this pattern matches. This is a comma delimited list. Ex: spaceFound=true,missingAction=onTest
454-
* @view The view to dispatch if pattern matches. No event will be fired, so handler,action will be ignored.
455-
* @viewNoLayout If view is chosen, then you can choose to override and not display a layout with the view. Else the view renders in the assigned layout.
456-
* @valuePairTranslation Activate convention name value pair translations or not. Turned on by default
457-
* @constraints A structure of regex constraint overrides for variable placeholders. The key is the name of the variable, the value is the regex to try to match.
458-
* @module The module to add this route to
459-
* @moduleRouting Called internally by addModuleRoutes to add a module routing route.
460-
* @namespace The namespace to add this route to
461-
* @namespaceRouting Called internally by addNamespaceRoutes to add a namespaced routing route.
462-
* @ssl Makes the route an SSL only route if true, else it can be anything. If an ssl only route is hit without ssl, the interceptor will redirect to it via ssl
463-
* @append Whether the route should be appended or pre-pended to the array. By default we append to the end of the array
464-
* @domain The domain to match, including wildcards
465-
*
466-
* @return Router
467-
*/
468-
function with(
469-
string pattern,
470-
string handler,
471-
any action,
472-
boolean packageResolverExempt,
473-
string matchVariables,
474-
string view,
475-
boolean viewNoLayout,
476-
boolean valuePairTranslation,
477-
any constraints,
478-
string module,
479-
string moduleRouting,
480-
string namespace,
481-
string namespaceRouting,
482-
boolean ssl,
483-
boolean append,
484-
string domain
485-
){
486-
// set the withClosure
487-
variables.withClosure.append( arguments );
488-
return this;
489-
}
490-
491-
/**
492-
*
493-
* End a with closure and returns itself
494-
*
495-
* @deprecated This has been deprecated in favor of the <code>group()</code> function.
496-
*
497-
* @return Router
498-
*/
499-
function endWith(){
500-
variables.withClosure = {};
501-
return this;
502-
}
503-
504444
/**
505445
* process a with closure
506446
*
@@ -535,7 +475,6 @@ component
535475
}
536476

537477
/**
538-
* This is the new approach to the <code>with</code> closure approach which has been marked as deprecated.
539478
* You can pass any route option via the <code>options</code> structure and those values will be prefixed against
540479
* any routing values done within the <code>body</code> closure.
541480
*
@@ -771,7 +710,6 @@ component
771710
* @handler The handler to execute if pattern matched.
772711
* @action The action in a handler to execute if a pattern is matched. This can also be a structure based on the HTTP method(GET,POST,PUT,DELETE). ex: {GET:'show', PUT:'update', DELETE:'delete', POST:'save'}
773712
* @packageResolverExempt If this is set to true, then the interceptor will not try to do handler package resolving. Else a package will always be resolved. Only works if :handler is in a pattern
774-
* @matchVariables DEPRECATED: Use RC or PRC structs instead. A string of name-value pair variables to add to the request collection when this pattern matches. This is a comma delimited list. Ex: spaceFound=true,missingAction=onTest
775713
* @view The view to dispatch if pattern matches. No event will be fired, so handler,action will be ignored.
776714
* @viewNoLayout If view is chosen, then you can choose to override and not display a layout with the view. Else the view renders in the assigned layout.
777715
* @valuePairTranslation Activate convention name value pair translations or not. Turned on by default
@@ -805,7 +743,6 @@ component
805743
string handler = "",
806744
any action = "",
807745
boolean packageResolverExempt = "false",
808-
string matchVariables = "",
809746
string view = "",
810747
boolean viewNoLayout = "false",
811748
boolean valuePairTranslation = "true",

system/web/services/RoutingService.cfc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -590,16 +590,6 @@ component extends="coldbox.system.web.services.BaseService" accessors="true" {
590590
findConventionNameValuePairs( requestString, match, results.params );
591591
}
592592

593-
// Process legacy match-variables to incorporate to discovered params
594-
results.route.matchVariables
595-
.listToArray()
596-
.each( function( item ){
597-
// Only set if not incoming.
598-
if ( !results.params.keyExists( item.getToken( 1, "=" ) ) ) {
599-
results.params[ item.getToken( 1, "=" ) ] = item.getToken( 2, "=" );
600-
}
601-
} );
602-
603593
return results;
604594
}
605595

0 commit comments

Comments
 (0)