diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index f5ae3847d..489e178a3 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -245,19 +245,19 @@ class Router { * Connects a new Route in the router. * * Routes are a way of connecting request URLs to objects in your application. At their core routes - * are a set or regular expressions that are used to match requests to destinations. + * are a set of regular expressions that are used to match requests to destinations. * * Examples: * * `Router::connect('/:controller/:action/*');` * - * The first parameter will be used as a controller name while the second is used as the action name. + * The first token ':controller' will be used as a controller name while the second is used as the action name. * the '/*' syntax makes this route greedy in that it will match requests like `/posts/index` as well as requests * like `/posts/edit/1/foo/bar`. * * `Router::connect('/home-page', array('controller' => 'pages', 'action' => 'display', 'home'));` * - * The above shows the use of route parameter defaults. And providing routing parameters for a static route. + * The above shows the use of route parameter defaults, and providing routing parameters for a static route. * * {{{ * Router::connect( @@ -269,6 +269,9 @@ class Router { * * Shows connecting a route with custom route parameters as well as providing patterns for those parameters. * Patterns for routing parameters do not need capturing groups, as one will be added for each route params. + * + * $defaults is merged with the results of parsing the request URL to form the final routing destination and its + * parameters. This destination is expressed as an associative array by Router. See the output of {@link parse()}. * * $options offers four 'special' keys. `pass`, `named`, `persist` and `routeClass` * have special meaning in the $options array. @@ -304,6 +307,7 @@ class Router { * shifted into the passed arguments, supplying patterns for routing parameters and supplying the name of a * custom routing class. * @see routes + * @see parse(). * @return array Array of routes * @throws RouterException */