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
Post a Comment