Welcome Guest, Not a member yet? Register   Sign In
NetBeans Plugin - Second Iteration


My primary IDE for PHP projects is PhpStorm. Despite the fact it doesn't support CodeIgniter libraries' auto-completion out of the box, there is a simple trick to get exactly what you need  Wink

You can simply add the docblock section before your class declaration (it can be controller, model, whatever) where you directly set the class of the properties inherited from the CodeIgniter base classes.

[Image: storm_autocompletes_ci.png]

In order to simplify things you can create core/MY_Controller.php file (in case you didn't do this before) and set all the properties there.

PHP Code:
 * Class MY_Controller
 * Classes created be developer
 * @property Model_news $news
 * @property Model_pages $pages
 * @property Model_blog $blog
 * @property Model_products $products
 * Properties inherited from CI_Controller
 * @property CI_Loader $load
 * @property CI_Input $input
 * @property CI_Cache $cache
 * @property CI_Pagination $pagination
 * @property CI_Form_validation $form_validation
 * @property CI_DB_active_record $db
class MY_Controller extends CI_Controller {} 

Then you just inherit your controllers from MY_Controller and have your auto-completion working. Same thing should be done for Models.

Maybe this way is not that perfect, but it is pretty easy and straightforward.


Messages In This Thread
NetBeans Plugin - Second Iteration - by jlp - 03-16-2015, 02:26 PM
RE: NetBeans Plugin - Second Iteration - by qzzm - 03-19-2015, 06:33 AM
RE: NetBeans Plugin - Second Iteration - by codinghamster - 05-06-2015, 05:45 AM
RE: NetBeans Plugin - Second Iteration - by jlp - 07-01-2015, 11:23 AM

Theme © iAndrew 2016 - Forum software by © MyBB