mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-08 04:22:40 +00:00
Merge remote-tracking branch 'origin/2.0' into 2.0-class-loading
Conflicts: cake/libs/view/helpers/js.php cake/tests/lib/templates/missing_conenction.php cake/tests/lib/templates/missing_connection.php lib/Cake/Model/ConnectionManager.php lib/Cake/TestSuite/templates/missing_conenction.php lib/Cake/View/Helper/FormHelper.php lib/Cake/tests/Case/Core/ConfigureTest.php
This commit is contained in:
commit
000e05b468
40 changed files with 342 additions and 110 deletions
|
@ -221,7 +221,8 @@ 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.
|
||||
*
|
||||
* $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')`
|
||||
|
@ -233,6 +234,9 @@ class Router {
|
|||
* `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.
|
||||
|
@ -286,7 +290,7 @@ class Router {
|
|||
* `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));`
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue