Welcome Guest, Not a member yet? Register   Sign In
Get and Override Default Controller Programmatically
#11

[eluser]CroNiX[/eluser]
These should work. You have to access the router object, not "routes"...
Code:
print_r($this->router->routes);
or
Code:
global $RTR;
print_r($RTR->routes);

Code:
echo $this->router->routes['default_controller'];
#12

[eluser]TWP Marketing[/eluser]
<facepalm> Thanks CroNix, that solves it.
#13

[eluser]CroNiX[/eluser]
Sure, although I'm not sure what good it will do. You can only really use it to check something, not set it, since the router has already done the routing before it gets to the controller.




Theme © iAndrew 2016 - Forum software by © MyBB