Get Parameter passed to the action in a CodeIgniter Hook -


i' m trying create acl codeigniter , got stuck @ 1 point.

i cannot figure out how parameter passed method. example url looks this: http://ci.dev/controller/action/31

i managed controller , method/action this:

$class = $ci->router->fetch_class(); $method = $ci->router->fetch_method(); 

however cannot figure out how parameter (in example 31). kinda essential me, since want control whether user allowed edit items belong user.

i not want use kind of uri-fetching, because route might different sometimes, e.g.:http://ci.dev/controller/31/action

just little information, i' m post_controller_constructor hook.

i want prepared this.

any appreciated. in advanced.

the uri library has methods retrieving post-routed details. these methods have r somewhere in it, rsegment() example.

$ci->uri->rsegment_array() sufficient. there's nothing parameters, can knock off first 2 array items , rest parameters.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -