Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14114

Code completion suggestion

$
0
0
Because CI uses dynamic class members for every loaded thing
PHP Code:
foreach (is_loaded() as $var => $class)
{
    
$this->$var =& load_class($class);


IDEA like PHPStorm have difficulty with code completion, and shows many many warnings, for stuff like "$this->db"

There is an open YouTrack feature request for over 6 years, which testifies how difficault it is to interperate what is and what is not a member of the classes CI_Controller and CI_Model.

The current fix people that use PHPStorm are using, is this. A code completion helper, that adds "properties" to above classes, and makes life coding with CI much more pleasant.

Now, I know it is not technically correct to add those as properties, because they are extremely dynamic, but I think that the CC helpers adds the essentials, that are by default loaded, so I think adding those to the core codebase would be helping, even though not fully correct.


What do you think?
Do you have a better solution for the given problem?

Viewing all articles
Browse latest Browse all 14114


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>