Accessing The Current Route Controller and Action

29 views
Skip to first unread message

Ali Barani

unread,
May 23, 2019, 2:40:15 AM5/23/19
to Fat-Free Framework
I have set up my routs this way :
GET /@Controller/@Action = @Controller->@Action
POST /@Controller/@Action = @Controller->@Action
how can i determine the real Controller and Action names anywhere in my code?
is there a hive key for that?

Paul Herring

unread,
May 23, 2019, 3:26:13 AM5/23/19
to Ali Barani via Fat-Free Framework, Fat-Free Framework
For @Controller, you'll be running code in the class represented by @Controller - php's get_class() will get you that, if you actually need it.

--
-- You've received this message because you are subscribed to the Google Groups group. To post to this group, send an email to f3-fra...@googlegroups.com. To unsubscribe from this group, send an email to f3-framework...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/f3-framework?hl=en
---
You received this message because you are subscribed to the Google Groups "Fat-Free Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to f3-framework...@googlegroups.com.
To post to this group, send email to f3-fra...@googlegroups.com.
Visit this group at https://groups.google.com/group/f3-framework.
To view this discussion on the web visit https://groups.google.com/d/msgid/f3-framework/fa28bea6-ad0f-4c4c-92ca-40f5abb262aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
PJH

ved

unread,
May 23, 2019, 3:45:06 AM5/23/19
to Fat-Free Framework
Hi,
Those should be accessible through the PARAMS key:

$f3->get('PARAMS.Controller');
$f3
->get('PARAMS.Action');

Cheers.
Reply all
Reply to author
Forward
0 new messages