Welcome Guest, Not a member yet? Register   Sign In
Retrieving the default controller config item
#1

[eluser]NemetraL[/eluser]
Hello,

The problem is: I'd need to retrieve
Code:
$route['default_controller'];
from a post-controller-constructor hook.

There's the raw way, which consists in copying the Router library code directly inside the hook:
Code:
// Load the routes.php file.
@include(APPPATH.'config/routes'.EXT);
$this->routes = ( ! isset($route) OR ! is_array($route)) ? array() : $route;
unset($route);
The point is: this file has already been loaded and the class has already been created (in the system/codeigniter/CodeIgniter.php file, under the name $RTR).

But once the controller is loaded, I can't find it anymore :-S

Any idea?


Messages In This Thread
Retrieving the default controller config item - by El Forum - 08-25-2007, 04:54 PM
Retrieving the default controller config item - by El Forum - 08-25-2007, 04:58 PM
Retrieving the default controller config item - by El Forum - 08-26-2007, 07:44 PM
Retrieving the default controller config item - by El Forum - 08-27-2007, 03:16 AM
Retrieving the default controller config item - by El Forum - 04-15-2011, 04:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB