![]() |
Get current conroller/controller-function inside a library - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Get current conroller/controller-function inside a library (/showthread.php?tid=6752) |
Get current conroller/controller-function inside a library - El Forum - 03-10-2008 [eluser]Ebot Ndip-Agbor[/eluser] What I want to do is get the controller and controller function that called the library i am using. Something like this Code: class Some_controller extends Controller { I want to get some_controller/some_function within the library to use for a redirect. N.B: Didnt want to use Code: $this->uri->segment() Thought of passing it as a parameter to the library :roll:. Need some insight please. Get current conroller/controller-function inside a library - El Forum - 03-10-2008 [eluser]wiredesignz[/eluser] Code: // pass data to the library constructor Get current conroller/controller-function inside a library - El Forum - 03-10-2008 [eluser]Ebot Ndip-Agbor[/eluser] That does not solve my problem. I want to know the controller/controller-method that called the library. I guess the only way to achieve this will be to pass the current controller/controller-method as parameter to the library when calling it. Code: $this->some_library('controller_name_and_method'); Get current conroller/controller-function inside a library - El Forum - 03-10-2008 [eluser]wiredesignz[/eluser] If you say so ![]() Get current conroller/controller-function inside a library - El Forum - 03-10-2008 [eluser]Ebot Ndip-Agbor[/eluser] @wiredesign Thanks for posting by the way. |