Skip to content

jromero-onclick/codeigniter-skeleton-helpers-for-phpStorm

 
 

Repository files navigation

#Code completion for CodeIgniter-Skeleton in JetBrains PhpStorm and IntelliJ IDEA

##1. Include this repository in the content root for your project ##2. Right-click on application/core/MY_Controller.php and choose "Mark as Plain Text" If you have multiple CodeIgniter-Skeleton roots in your project, you must do this for every copy.

This step forces IntelliJ to use this repo's MY_Controller class as the class that all of your controllers inherit from.

This repo's MY_Controller class can be found in codeigniter-skeleton_phpStorm.php.

If you have modified your copy of MY_Controller, this step may screw up code completion for any methods you have added to MY_Controller.

In that case, or if you do not inherit from MY_Controller, you should copy the properties in the doc for this repo's MY_Controller class and paste them just above your own MY-Controller class instead of marking MY_Controller as plain text.

At this point, you should have simple completion for $this->config, $this->load, $this->input, etc.

##3. Add your models into the properties of this repo's my_models.php Use the example in that file as a template for your entries.

Use no path, only the class names.

Do this for all models in your project.

You should now be able to complete model names, e.g. $this->my_model

##4. Right click on system/core/Model.php and choose "Mark as Plain Text" The same remarks made for MY_Controller with regards to inheritance apply equally to Model.php / CI_Model, so you will have to copy the properties and skip marking Model.php as plain text if any of the conditions listed above apply.

You should now have code competion within models as well as within controllers.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%