• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loading libaries, helpers, configs, models etc at call-time

#1
[eluser]micha8l[/eluser]
I was thinking, by way of overloading, is it possible/recommendable to load a model or something at call-time.

Standard codeigniter way:
Code:
$this->load->model(array('blog_model', 'blog_posts_model'));
$this->blog_model->do_something();


Without loading beforehand
Code:
@$this->blog_model->do_something(); // ??

I'm just trying to refactor my code by cutting down on maintenance and lines used. Please tell me if this is possible/been done/bad idea, etc, etc?


Messages In This Thread
Loading libaries, helpers, configs, models etc at call-time - by El Forum - 08-07-2012, 05:43 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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