classes/Ergo/Routing/Router.php
public function connect($template, $name, $controller=null, $metadata=array())
	{
		if(is_object($template))
			$this->_customRoutes[$name] = $template;
		else
			$this->_routes[$name] = new Route($name, $template);

		if($metadata)
			$this->_metadata[$name] = $metadata;

		if($controller)
			$this->_controllers[$name] = $controller;

		return $this;
	}
public function connect($template, $name, $controller=null, $metadata=array())
	{
		if(is_object($template))
			$this->_customRoutes[$name] = $template;
		else
			$this->_routes[$name] = new Route($name, $template);

		if($metadata)
			$this->_metadata[$name] = $metadata;

		if($controller)
			$this->_controllers[$name] = $controller;

		return $this;
	}
public function connect ( $ template , $ name , $ controller = null , $ metadata = array ( ) ) { if ( is_object ( $ template ) ) $ this -> _customRoutes [ $ name ] = $ template ; else $ this -> _routes [ $ name ] = new Route ( $ name , $ template ) ; if ( $ metadata ) $ this -> _metadata [ $ name ] = $ metadata ; if ( $ controller ) $ this -> _controllers [ $ name ] = $ controller ; return $ this ; }
Gives a route template a unique name and a controller to route to
@param string a url template
@param string a unique name for the route
@param mixed a controller, either a class, a string or a callback
@chainable
Gives a route template a unique name and a controller to route to