src/conbo/net/Router.js
function(route, name, callback) 
	{
		var regExp = conbo.isRegExp(route) ? route : this.__routeToRegExp(route);
		
		if (!callback) 
		{
			callback = this[name];
		}
		
		if (conbo.isFunction(name)) 
		{
			callback = name;
			name = '';
		}
		
		if (!callback) 
		{
			callback = this[name];
		}
		
		this.__history.addRoute(regExp, (function(path)
		{
			var args = this.__extractParameters(regExp, path);
			
			var params = conbo.isString(route) 
				? conbo.object((route.match(/:\w+/g) || []).map(function(r) { return r.substr(1); }), args) 
				: {}
				;
			
			callback && callback.apply(this, args);
			
			var options = 
			{
				router:		this,
				route:		regExp,
				name:		name,
				parameters:	args,
				params:		params,
				path:		path
			};
			
			this.dispatchEvent(new conbo.ConboEvent('route:'+name, options));
			this.dispatchEvent(new conbo.ConboEvent(conbo.ConboEvent.ROUTE, options));
			
		}).bind(this));
		
		return this;
	}
function(route, name, callback) 
	{
		var regExp = conbo.isRegExp(route) ? route : this.__routeToRegExp(route);
		
		if (!callback) 
		{
			callback = this[name];
		}
		
		if (conbo.isFunction(name)) 
		{
			callback = name;
			name = '';
		}
		
		if (!callback) 
		{
			callback = this[name];
		}
		
		this.__history.addRoute(regExp, (function(path)
		{
			var args = this.__extractParameters(regExp, path);
			
			var params = conbo.isString(route) 
				? conbo.object((route.match(/:\w+/g) || []).map(function(r) { return r.substr(1); }), args) 
				: {}
				;
			
			callback && callback.apply(this, args);
			
			var options = 
			{
				router:		this,
				route:		regExp,
				name:		name,
				parameters:	args,
				params:		params,
				path:		path
			};
			
			this.dispatchEvent(new conbo.ConboEvent('route:'+name, options));
			this.dispatchEvent(new conbo.ConboEvent(conbo.ConboEvent.ROUTE, options));
			
		}).bind(this));
		
		return this;
	}
function ( route , name , callback ) { var regExp = conbo . isRegExp ( route ) ? route : this . __routeToRegExp ( route ) ; if ( ! callback ) { callback = this [ name ] ; } if ( conbo . isFunction ( name ) ) { callback = name ; name = '' ; } if ( ! callback ) { callback = this [ name ] ; } this . __history . addRoute ( regExp , ( function ( path ) { var args = this . __extractParameters ( regExp , path ) ; var params = conbo . isString ( route ) ? conbo . object ( ( route . match ( / :\w+ / g ) || [ ] ) . map ( function ( r ) { return r . substr ( 1 ) ; } ) , args ) : { } ; callback && callback . apply ( this , args ) ; var options = { router : this , route : regExp , name : name , parameters : args , params : params , path : path } ; this . dispatchEvent ( new conbo . ConboEvent ( 'route:' + name , options ) ) ; this . dispatchEvent ( new conbo . ConboEvent ( conbo . ConboEvent . ROUTE , options ) ) ; } ) . bind ( this ) ) ; return this ; }
Adds a named route

@example
this.addRoute('search/:query/p:num', 'search', function(query, num) {
...
});
Adds a named route