Welcome Guest, Not a member yet? Register   Sign In
ME HMVC + custom library + fetch_module() does not work right
#5

[eluser]wilso417[/eluser]
oh yeah, $this->module_name exists because I modified MX/Controller.php as well

class MX_Controller {

public $module_name;

public function __construct() {

// set base module variables
$this->module_name = $this->router->fetch_module();
}
}

so this gives me about the most flexibility. if i'm in a controller i can call $this->module_name and always get the current module i'm working in. If a library needs the current module name, like my template library, I call $this->router->fetch_module() and I just need to make sure that this is always set correctly, and to help with this I switch the $this->router->module to the correct module like in my first example.


Messages In This Thread
ME HMVC + custom library + fetch_module() does not work right - by El Forum - 05-09-2012, 08:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB