summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/general/routing.rst
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source/general/routing.rst')
-rw-r--r--user_guide_src/source/general/routing.rst11
1 files changed, 11 insertions, 0 deletions
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
===============