Created
February 8, 2011 21:45
-
-
Save steffen/817324 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ext.override(Ext.util.Route, { | |
constructor: function(config) { | |
Ext.apply(this, config, { | |
conditions: {} | |
}); | |
/* | |
* The regular expression we use to match a segment of a route mapping | |
* this will recognise segments starting with a colon, | |
* e.g. on 'namespace/:controller/:action', :controller and :action will be recognised | |
*/ | |
this.paramMatchingRegex = new RegExp(/:([0-9A-Za-z\_-]*)/g); | |
console.log('It's calling'); | |
/* | |
* Converts a route string into an array of symbols starting with a colon. e.g. | |
* ":controller/:action/:id" => [':controller', ':action', ':id'] | |
*/ | |
this.paramsInMatchString = this.url.match(this.paramMatchingRegex) || []; | |
this.matcherRegex = this.createMatcherRegex(this.url); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment