Expose current_request()
Reported by Gustavo Di Pietro | April 4th, 2011 @ 07:57 AM
It would be useful to have a globally accesible function or variable that returns what the currently requested route is.
Example:
dispatch('/', 'home');
dispatch('blog', 'blog');
within configure() or before() or after() I cannot know if the request is going to be 'home' or 'blog'.
Comments and changes to this ticket
-
xangelo (at gmail) April 4th, 2011 @ 09:38 PM
This is already in place with request_uri
using your example
function before() { if(request_uri() == '/blog') { } else if(request_uri() == '/') { } }
-
Fabrice Luraine May 27th, 2011 @ 07:02 AM
- State changed from new to invalid
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Limonade is a PHP micro-framework.