Framework/Router/Router.php
/**
	 * Add route to routes in Router
	 * 
	 * @param $routeOptions passed option for create new Route;
	 */
Add route to routes in Router

@param $routeOptions passed option for create new Route.
Add route to routes in Router @param $routeOptions passed option for create new Route .
public function addRoute($routeOptions)
	{
		$route = new Route();
		$routeAction = $this->makeRouteAction($routeOptions['action']);
		$route->setUri($routeOptions['uri'])
			  ->setAction($routeAction);
		if (array_key_exists('method', $routeOptions)) {
			$route->setMethod($routeOptions['method']);
		}
		$this->routes[] = $route;
	}
public function addRoute ( $ routeOptions ) { $ route = new Route ( ) ; $ routeAction = $ this -> makeRouteAction ( $ routeOptions [ 'action' ] ) ; $ route -> setUri ( $ routeOptions [ 'uri' ] ) -> setAction ( $ routeAction ) ; if ( array_key_exists ( 'method' , $ routeOptions ) ) { $ route -> setMethod ( $ routeOptions [ 'method' ] ) ; } $ this -> routes [ ] = $ route ; }
Add route to routes in Router
Add route to routes in Router