⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

CodeIgniter autocompletion trick



goFrendiAsgard
  • profile picture
  • Member

Posted 16 February 2013 - 00:52 AM

The most terrible thing when develop CodeIgniter based application is netbeans/eclipse missing auto-completion feature. For example, when you load a model, netbeans/eclipse cannot automatically show you what functions available in that model.

There is a "trick" for that:

$this->load->model('your_model');
$this->your_model = new Your_Model(); 

 


By adding that line, now you can have a working auto-completion to make your development time more painless :)

However it has some consideration:

  1. You will need to add an extra line for that
  2. The model will be instantiated twice

​This trick also works for "library". And groceryCRUD example already use such a trick.