![]() |
How to retrieve the value of 'default_controller' ? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: How to retrieve the value of 'default_controller' ? (/showthread.php?tid=35462) |
How to retrieve the value of 'default_controller' ? - El Forum - 10-30-2010 [eluser]stormbytes[/eluser] I'm wondering if it's possible to retrieve the value for 'default_controller' from Routes? How to retrieve the value of 'default_controller' ? - El Forum - 10-30-2010 [eluser]InsiteFX[/eluser] Code: $this->router->fetch_class(); InsiteFX How to retrieve the value of 'default_controller' ? - El Forum - 10-30-2010 [eluser]stormbytes[/eluser] Hiya InsiteFX ![]() I don't think that's right... $this->router->fetch_class() returns the 'current' class (and not the default_controller). Now, I don't actually "know" this ![]() ![]() Especially when the $var I've assigned that result to changes with each pass! I do know it's somewhere in the Router class.. How to retrieve the value of 'default_controller' ? - El Forum - 10-30-2010 [eluser]stormbytes[/eluser] Oh here's a source: Quote:fetch_class() URL: http://www.tig12.net/downloads/apidocs/codeigniter/libraries/CI_Router.class.html How to retrieve the value of 'default_controller' ? - El Forum - 10-30-2010 [eluser]stormbytes[/eluser] In case someone comes across this post looking for the same... Code: // Load the routes.php file. Taken from: http://ellislab.com/forums/viewthread/159796/ |