 					matchedHandler.push handler
 				else if handler.test(fragment) is true
 					if handler.isVariable and handler.types.length > 0
-						args = handler._extractParams(@.fragment)						
+						args = handler._extractParams(@.fragment)
 						argsMatch = []
 						len = args.length
 						i = 0

			return
		routes = @_keys(@.routes)
		for rule in routes
			@registHandler(rule, @.routes[rule],false)
		return

	# befores から指定された事前に処理したいメソッドをバインド
	_bindBefores:()->
		if not @.befores?
			return 
		befores = @_keys(@.befores)
		for key in befores
			@registHandler(key, @.befores[key], true)

		if @.beforeAnytime
			callback = @_bindFunctions(@.beforeAnytime)
			@.beforeAnytimeHandler = {
					callback:@_binder (fragment)->
						args = [fragment]						
						callback && callback.apply(@, args)
					,@
				}

					@queue = []
					@index = -1
					@.dispatchEvent({type:KazitoriEvent.TASK_QUEUE_COMPLETE})

		catch error
			@reject(error)

	reject:(error)->
		@dispatchEvent({type:KazitoriEvent.TASK_QUEUE_FAILED, index:@index, message:error.message })

class KazitoriEvent
	next:null
