Phpstorm supports Codeigniter (CI) code autocompletion (code prompt) and phpstormcodeigniter
1. Set the font and Style
If you select Monokai as the Code topic, the color code is used.
2. Configure the CI code prompt
<1> download code:
Https://github.com/topdown/phpStorm-CC-Helpers
<2> copy the prompt clip:
Copy CI_phpStorm.php, DB_active_rec.php (renamed DB_query_builder.php), and my_models.php to the root directory of the website, that is, the same directory as index. php.
<3> set the CI core class to plain text:
Right-click core/Controller. php, core/Model. php, database/DB_query_builder.php in system and set it to plain text.
Now the code has been completed.
<4> implement the model prompt function:
Add the Model class in the comment of my_models.php. Note that the first letter of the class name should be changed to lower case. In this way, the Model prompts.
<5> view implementation prompt:
The corresponding controller class needs to implement the _ toString () method.
Press ctrl + the left mouse button to see which class he is from (ctrl + q show comments). If you click the function name, you can navigate to the function.
<6> model subfolders
Create a folder in the model, for example, create a model class: mod/Test1_model.php.
Add comments in my_models.php, but ignore the mod folder. When this folder does not exist, it is the same:
@ Property test1_model $ test1_model
But when the code is loaded, this folder should be reflected, so it will not affect the code prompt:
$ This-> load-> model ('mod/test10000model ');
$ Data ['news2'] = $ this-> test1_model-> getData ();
<7> implement the library custom class prompt Function
The custom code will be placed in libraries and in a separate sub-folder. Because this Code may be reused, this sub-folder will be used as a separate git, while other code is unlikely to be reused, closely following the unique business logic of the website, without considering the reuse issue. So how do I make code prompts for such custom code? It is the same as model:
@ Property Testzphp
$ Testzphp
Then in the controller:
$ This-> load-> library ('zphp/testzphp ');
$ Data ['zphp'] = $ this-> testzphp-> test (235 );
3. git Configuration
Add. idea To the ignore list.
4. Remove the spelling check.
Project settings ---> inspections ---> spelling ---> remove the Typo check.
5. Shortcut Keys
<1> quick navigation
After you navigate to the corresponding class-method to view the source code, you must be able to return quickly: ctrl + alt + left arrow/right arrow
The above details about phpstorm's perfect support for Codeigniter (CI) code autocompletion (code prompt) are all the content shared by the editor. I hope to give you a reference, we also hope that you can support the customer's home.