Let phpstrom support the codeigniter framework implementation (GOTO) to the defined function 2016-2-9PandaIT PHP
In the previous article, I just mentioned that you can add a ci_phpstrom.php file to support some methods and custom variables in the codeigniter framework. If we use the model layer in the controller, the function of converting CTRL + left to method definition cannot be implemented.
At this time, we need to add the following annotations in the CI_Controller header or The extends class:
/** * @property m_userfound_lockedinfo $m_userfound_lockedinfo * @property m_withdrawal $m_withdrawal * @property m_withdrawal_faildata $m_withdrawal_faildata */class MY_Controller extends CI_Controller{ //...}
In this case, we use
class home extends my_api_controller{ function __construct() { parent::__construct(); $this->load->model('m_clientlog'); } public function index_get() { $this->m_clientlog->updateClientLog(); }}
At this time, we can find that the method (function) in m_clientlog will have an automatic prompt function in phpStrom, and the parameter description will be included, this is of great help to improve programming efficiency.
At the same time, I also wrote a code that outputs the annotation Declaration. every time I add or modify the model file, run and copy the file to add the automatic completion prompt.
";}