diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-10-31 15:51:29 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-10-31 15:51:29 +0100 |
commit | 0bae250a59393bb8ee9ee68525ad0d295067febf (patch) | |
tree | f4815b4fdace4a24509377f3f41b72b3e49e6a62 /user_guide_src | |
parent | 704f3f5223637dd6008106b1d04a68668458590e (diff) | |
parent | 3ccc386be4e0e1e4b3d47f1785e11d4b8613ef72 (diff) |
Merge pull request #1636 from jdfm/develop
Processed routes
Diffstat (limited to 'user_guide_src')
-rw-r--r-- | user_guide_src/source/changelog.rst | 1 | ||||
-rw-r--r-- | user_guide_src/source/general/routing.rst | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4fda2903a..2df8ca7c1 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -269,6 +269,7 @@ Release Date: Not Released - Added method ``strip_image_tags()``. - Added ``$config['csrf_regeneration']``, which makes token regeneration optional. - Added ``$config['csrf_exclude_uris']``, which allows you list URIs which will not have the CSRF validation methods run. + - Added possibility to route requests using callbacks. Bug fixes for 3.0 ------------------ diff --git a/user_guide_src/source/general/routing.rst b/user_guide_src/source/general/routing.rst index a6332c90c..43c181669 100644 --- a/user_guide_src/source/general/routing.rst +++ b/user_guide_src/source/general/routing.rst @@ -131,6 +131,17 @@ might be a good starting point. ..note:: You can also mix and match wildcards with regular expressions. +Callbacks +========= + +If you are using PHP >= 5.3 you can use callbacks in place of the normal routing +rules to process the back-references. Example:: + + $route['products/([a-z]+)/edit/(\d+)'] = function ($product_type, $id) + { + return "catalog/product_edit/" . strtolower($product_type) . "/" . $id; + }; + Reserved Routes =============== |