lib/middleware.php
public function on($event,$pattern,$handler) {
		$bak = $this->f3->ROUTES;
		$this->f3->ROUTES=array();
		$this->f3->route($pattern,$handler);
		$this->routes[$event] = (isset($this->routes[$event]))
			? $this->f3->extend('ROUTES',$this->routes[$event]) : $this->f3->ROUTES;
		$this->f3->ROUTES=$bak;
	}
public function on($event,$pattern,$handler) {
		$bak = $this->f3->ROUTES;
		$this->f3->ROUTES=array();
		$this->f3->route($pattern,$handler);
		$this->routes[$event] = (isset($this->routes[$event]))
			? $this->f3->extend('ROUTES',$this->routes[$event]) : $this->f3->ROUTES;
		$this->f3->ROUTES=$bak;
	}
public function on ( $ event , $ pattern , $ handler ) { $ bak = $ this -> f3 -> ROUTES ; $ this -> f3 -> ROUTES = array ( ) ; $ this -> f3 -> route ( $ pattern , $ handler ) ; $ this -> routes [ $ event ] = ( isset ( $ this -> routes [ $ event ] ) ) ? $ this -> f3 -> extend ( 'ROUTES' , $ this -> routes [ $ event ] ) : $ this -> f3 -> ROUTES ; $ this -> f3 -> ROUTES = $ bak ; }
register route to a specific event
@param $event
@param $pattern
@param $handler
register route to a specific event