Welcome Guest, Not a member yet? Register   Sign In
Loading library/model in a constructor
#3

[eluser]CI Coder[/eluser]
I've had this problem lately while working on a project. I have decided to add this code at the end of Load::model() method:

<code>
foreach ( $this->_ci_models as $m ){
$CI->$m->_assign_libraries();
}
</code>

I's annoying to have to type $this->_assign_libraries() all the time.

All the best!


Messages In This Thread
Loading library/model in a constructor - by El Forum - 02-13-2010, 07:00 AM
Loading library/model in a constructor - by El Forum - 03-02-2010, 01:00 PM
Loading library/model in a constructor - by El Forum - 01-27-2011, 07:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB