From cf168303ead21d1c8ad89af01458806e6be197fd Mon Sep 17 00:00:00 2001 From: Jonatas Miguel Date: Mon, 6 Aug 2012 17:10:17 +0100 Subject: Updated documentation --- user_guide_src/source/general/routing.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'user_guide_src/source/general/routing.rst') diff --git a/user_guide_src/source/general/routing.rst b/user_guide_src/source/general/routing.rst index 45950fc11..6bb5bdbc5 100644 --- a/user_guide_src/source/general/routing.rst +++ b/user_guide_src/source/general/routing.rst @@ -106,6 +106,16 @@ call the shirts controller class and the id_123 function. 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 =============== -- cgit v1.2.3-24-g4f1b