From d5cf1a4e24232a619229df54a62c50d42e628da6 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sun, 6 Jul 2014 22:20:34 -0700 Subject: [PATCH] Updated documentation on route info. --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 711ace6..aeb31d0 100644 --- a/README.md +++ b/README.md @@ -216,8 +216,10 @@ Flight::route('/user/*', function(){ ## Route Info -Your matching callback will be passed a route object which you can use to inspect -route information. +If you want to inspect the matching route information, you can request for the route +object to be passed to your callback by passing in `true` as the third parameter in +the route method. The route object will always be the last parameter passed to your +callback function. ```php Flight::route('/', function($route){ @@ -232,7 +234,7 @@ Flight::route('/', function($route){ // Contains the contents of any '*' used in the URL pattern $route->splat; -}); +}, true); ``` # Extending