• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HMVC - use of Modules::run vs $this->load0>modules

#1
Hello CI Community,

I was researching the forums for an answer to this question and I could not find it.

I am new to HMVC and I saw that you can call a method from a controller in any part of the code. To do so, there are 2 way to go about it

$this->load->modules('mycontroller')
$this->mycontroller->mymethod($data)

or
Modules::run('mycontroller','mymethod',$data).

so the question is simple: which is the best practice? Why 2 way of doing it. Which one is more performant than the other etc.

Please let us know. Thank you
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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