![]() |
How to pass HMVC main controller global variables to modules - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: How to pass HMVC main controller global variables to modules (/showthread.php?tid=48734) |
How to pass HMVC main controller global variables to modules - El Forum - 01-26-2012 [eluser]valchazzz[/eluser] My problem - in HMVC module i can't access defined in main controller "global" variables. It's not horrible to pass whole ci $this object from main controller to module constructor? main controller, part of _remap: Code: $this->variable = 'test'; and here is welcome constructor, here i will work with $my variable, to access global variables: Code: public $my; I see it works, but maybe i just broke HMVC idea... How to pass HMVC main controller global variables to modules - El Forum - 01-28-2012 [eluser]valchazzz[/eluser] Few days and no answer... |