• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Call another controller inside action?

#1
[eluser]tkrop[/eluser]
I'm in the process of converting a website from our custom framework to CodeIgniter. Our framework basically returns an ActionResult from every controller action, which can be converted to a string.

This is the situation:

Code:
function ControllerAction($route) {
    $subcontrollerRef = $route->object;
    $page = $route->page;
    $subpage = $route->subpage;

    $controller = ControllerFactory::getController($subcontrollerRef);
    return $controller->$page($route); //dont know if this is syntactically correct, but this is what's going on. The $page function inside the $controller var, is the 'action' name that needs to be executed/returned.
}

Can this be done with CodeIgniter?


Messages In This Thread
Call another controller inside action? - by El Forum - 03-18-2010, 10:13 AM
Call another controller inside action? - by El Forum - 08-08-2010, 08:52 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.