这是对我有用的解决方案:https ://github.com/Stunt/Codeigniter-autocomplete/
我正在使用 phpStorm,但我想它可以与 IDEA 一起使用。
无需将文件标记为纯文本。只需将 autocomplete.php 文件放入 application/config 文件夹即可。我怀疑 github 上的链接会变坏,但以防万一这里是文件的内容。
<?php
// help IDE(s) support Codeigniter 2.0
/**
* @property CI_DB_active_record $db
* @property CI_DB_forge $dbforge
* @property CI_Benchmark $benchmark
* @property CI_Calendar $calendar
* @property CI_Cart $cart
* @property CI_Config $config
* @property CI_Controller $controller
* @property CI_Email $email
* @property CI_Encrypt $encrypt
* @property CI_Exceptions $exceptions
* @property CI_Form_validation $form_validation
* @property CI_Ftp $ftp
* @property CI_Hooks $hooks
* @property CI_Image_lib $image_lib
* @property CI_Input $input
* @property CI_Language $language
* @property CI_Loader $load
* @property CI_Log $log
* @property CI_Model $model
* @property CI_Output $output
* @property CI_Pagination $pagination
* @property CI_Parser $parser
* @property CI_Profiler $profiler
* @property CI_Router $router
* @property CI_Session $session
* @property CI_Sha1 $sha1
* @property CI_Table $table
* @property CI_Trackback $trackback
* @property CI_Typography $typography
* @property CI_Unit_test $unit_test
* @property CI_Upload $upload
* @property CI_URI $uri
* @property CI_User_agent $user_agent
* @property CI_Validation $validation
* @property CI_Xmlrpc $xmlrpc
* @property CI_Xmlrpcs $xmlrpcs
* @property CI_Zip $zip
*
*
*
* These are samples entries to make my own functions work.
* Remove these and add you custom ones.
* @property Tank_auth $tank_auth
* @property Users_model $users_model
* @property Firms_model $firms_model
* @property Firms_model_master $firms_model_master
*
*
*/
class CI_Controller {};
class MY_Controller extends CI_Controller {};
/**
* @property CI_DB_active_record $db
* @property CI_DB_forge $dbforge
* @property CI_Config $config
* @property CI_Loader $load
* @property CI_Session $session
*/
class CI_Model {};
/* End of file autocomplete.php */
/* Location: ./application/config/autocomplete.php */
?>
CIv3 更新:如果您使用的是 CodeIgniter V 3.x,请改用它。
<?php
/**
* @property CI_DB_query_builder|CI_DB_postgre_driver $db This is the platform-independent base Active Record implementation class.
* @property CI_DB_forge $dbforge Database Utility Class
* @property CI_Benchmark $benchmark This class enables you to mark points and calculate the time difference between them.<br /> Memory consumption can also be displayed.
* @property CI_Calendar $calendar This class enables the creation of calendars
* @property CI_Cart $cart Shopping Cart Class
* @property CI_Config $config This class contains functions that enable config files to be managed
* @property CI_Controller $controller This class object is the super class that every library in.<br />CodeIgniter will be assigned to.
* @property CI_Email $email Permits email to be sent using Mail, Sendmail, or SMTP.
* @property CI_Encrypt $encrypt Provides two-way keyed encoding using XOR Hashing and Mcrypt
* @property CI_Exceptions $exceptions Exceptions Class
* @property CI_Form_validation $form_validation Form Validation Class
* @property CI_Ftp $ftp FTP Class
* @property CI_Hooks $hooks Provides a mechanism to extend the base system without hacking.
* @property CI_Image_lib $image_lib Image Manipulation class
* @property CI_Input $input Pre-processes global input data for security
* @property CI_Lang $lang Language Class
* @property CI_Loader $load Loads views and files
* @property CI_Log $log Logging Class
* @property CI_Model $model CodeIgniter Model Class
* @property CI_Output $output Responsible for sending final output to browser
* @property CI_Pagination $pagination Pagination Class
* @property CI_Parser $parser Parses pseudo-variables contained in the specified template view,<br />replacing them with the data in the second param
* @property CI_Profiler $profiler This class enables you to display benchmark, query, and other data<br />in order to help with debugging and optimization.
* @property CI_Router $router Parses URIs and determines routing
* @property CI_Session $session Session Class
* @property CI_Encryption $encryption The Encryption Library provides two-way data encryption
* @property CI_Table $table HTML table generation<br />Lets you create tables manually or from database result objects, or arrays.
* @property CI_Trackback $trackback Trackback Sending/Receiving Class
* @property CI_Typography $typography Typography Class
* @property CI_Unit_test $unit_test Simple testing class
* @property CI_Upload $upload File Uploading Class
* @property CI_URI $uri Parses URIs and determines routing
* @property CI_User_agent $user_agent Identifies the platform, browser, robot, or mobile devise of the browsing agent
* @property CI_Form_validation $validation
* @property CI_Xmlrpc $xmlrpc XML-RPC request handler class
* @property CI_Xmlrpcs $xmlrpcs XML-RPC server class
* @property CI_Zip $zip Zip Compression Class
* @property CI_Javascript $javascript Javascript Class
* @property CI_Jquery $jquery Jquery Class
* @property CI_Utf8 $utf8 Provides support for UTF-8 environments
* @property CI_Security $security Security Class, xss, csrf, etc...
* @property Tank_auth $tank_auth
*
*/
class CI_Controller{}
class MY_Controller extends CI_Controller {};
/**
* @property CI_DB_query_builder|CI_DB_postgre_driver $db This is the platform-independent base Active Record implementation class.
* @property CI_DB_forge $dbforge Database Utility Class
* @property CI_Benchmark $benchmark This class enables you to mark points and calculate the time difference between them.<br /> Memory consumption can also be displayed.
* @property CI_Calendar $calendar This class enables the creation of calendars
* @property CI_Cart $cart Shopping Cart Class
* @property CI_Config $config This class contains functions that enable config files to be managed
* @property CI_Controller $controller This class object is the super class that every library in.<br />CodeIgniter will be assigned to.
* @property CI_Email $email Permits email to be sent using Mail, Sendmail, or SMTP.
* @property CI_Encrypt $encrypt Provides two-way keyed encoding using XOR Hashing and Mcrypt
* @property CI_Exceptions $exceptions Exceptions Class
* @property CI_Form_validation $form_validation Form Validation Class
* @property CI_Ftp $ftp FTP Class
* @property CI_Hooks $hooks Provides a mechanism to extend the base system without hacking.
* @property CI_Image_lib $image_lib Image Manipulation class
* @property CI_Input $input Pre-processes global input data for security
* @property CI_Lang $lang Language Class
* @property CI_Loader $load Loads views and files
* @property CI_Log $log Logging Class
* @property CI_Model $model CodeIgniter Model Class
* @property CI_Output $output Responsible for sending final output to browser
* @property CI_Pagination $pagination Pagination Class
* @property CI_Parser $parser Parses pseudo-variables contained in the specified template view,<br />replacing them with the data in the second param
* @property CI_Profiler $profiler This class enables you to display benchmark, query, and other data<br />in order to help with debugging and optimization.
* @property CI_Router $router Parses URIs and determines routing
* @property CI_Session $session Session Class
* @property CI_Encryption $encryption The Encryption Library provides two-way data encryption
* @property CI_Table $table HTML table generation<br />Lets you create tables manually or from database result objects, or arrays.
* @property CI_Trackback $trackback Trackback Sending/Receiving Class
* @property CI_Typography $typography Typography Class
* @property CI_Unit_test $unit_test Simple testing class
* @property CI_Upload $upload File Uploading Class
* @property CI_URI $uri Parses URIs and determines routing
* @property CI_User_agent $user_agent Identifies the platform, browser, robot, or mobile devise of the browsing agent
* @property CI_Form_validation $validation
* @property CI_Xmlrpc $xmlrpc XML-RPC request handler class
* @property CI_Xmlrpcs $xmlrpcs XML-RPC server class
* @property CI_Zip $zip Zip Compression Class
* @property CI_Javascript $javascript Javascript Class
* @property CI_Jquery $jquery Jquery Class
* @property CI_Utf8 $utf8 Provides support for UTF-8 environments
* @property CI_Security $security Security Class, xss, csrf, etc...
* @property Tank_auth $tank_auth
*/
class CI_Model {};
我不能把这一切归功于我。我找到了很多,但不记得在哪里。我确实需要添加一些以使其完整。