Skip to content

Commit

Permalink
Fixing some typos and adding some missing information.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Mar 21, 2011
1 parent f33329a commit 9dd39bb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cake/libs/router.php
Expand Up @@ -221,7 +221,8 @@ public static function getNamedExpressions() {
* 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.
*
* $options offers three 'special' keys. `pass`, `persist` and `routeClass` have special meaning in the $options array.
* $options offers four 'special' keys. `pass`, `named`, `persist` and `routeClass`
* have special meaning in the $options array.
*
* `pass` is used to define which of the routed parameters should be shifted into the pass array. Adding a
* parameter to pass will remove it from the regular route array. Ex. `'pass' => array('slug')`
Expand All @@ -233,6 +234,9 @@ public static function getNamedExpressions() {
* `routeClass` is used to extend and change how individual routes parse requests and handle reverse routing,
* via a custom routing class. Ex. `'routeClass' => 'SlugRoute'`
*
* `named` is used to configure named parameters at the route level. This key uses the same options
* as Router::connectNamed()
*
* @param string $route A string describing the template of the route
* @param array $defaults An array describing the default route parameters. These parameters will be used by default
* and can supply routing parameters that are not dynamic. See above.
Expand Down Expand Up @@ -286,7 +290,7 @@ public static function connect($route, $defaults = array(), $options = array())
* `Router::redirect('/home/*', array('controller' => 'posts', 'action' => 'view', array('persist' => true));`
*
* Redirects /home/* to /posts/view and passes the parameters to /posts/view. Using an array as the
* redirect destination allows you to use other routes to define where a url string should be redirected ot.
* redirect destination allows you to use other routes to define where a url string should be redirected to.
*
* `Router::redirect('/posts/*', 'http://google.com', array('status' => 302));`
*
Expand Down

0 comments on commit 9dd39bb

Please sign in to comment.