Expose current_request()
Reported by Gustavo Di Pietro | 2011-04-04 07:57:03 UTC
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) 2011-04-04 21:38:19 UTC
This is already in place with request_uri
using your example
function before() { if(request_uri() == '/blog') { } else if(request_uri() == '/') { } } -

Fabrice Luraine 2011-05-27 07:02:21 UTC
- 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.