private function add($path, $callable, $name, $method) {
		$route = new Route($path, $callable);

		$this->routes[$method][] = $route;

		if (is_string($callable) && $name === null) {
			$name = $callable;
		}

		// If the route has a name, add to named routes collection
		if ($name) {
			$this->namedRoutes[$name] = $route;
		}

		return $route;
	}
private function add($path, $callable, $name, $method) {
		$route = new Route($path, $callable);

		$this->routes[$method][] = $route;

		if (is_string($callable) && $name === null) {
			$name = $callable;
		}

		// If the route has a name, add to named routes collection
		if ($name) {
			$this->namedRoutes[$name] = $route;
		}

		return $route;
	}
private function add ( $ path , $ callable , $ name , $ method ) { $ route = new Route ( $ path , $ callable ) ; $ this -> routes [ $ method ] [ ] = $ route ; if ( is_string ( $ callable ) && $ name === null ) { $ name = $ callable ; } // If the route has a name, add to named routes collection if ( $ name ) { $ this -> namedRoutes [ $ name ] = $ route ; } return $ route ; }
Add route to collection of routes, implements Fluent design pattern

@param string $path HTTP request path
@param string $callable Class method or function to call
@param string $name Name of route
@param string $method HTTP method e.g (GET, POST, PUT, DELETE, etc.)

@return Route
Add route to collection of routes implements Fluent design pattern