IntelliJ IDEA 12 not finding CodeIgniter classes, throwing errors

后端 未结 2 2120
清歌不尽
清歌不尽 2021-02-09 02:40

I\'m using IntelliJ IDEA 12 to develop a PHP web application using the CodeIgniter framework. Due to the way CI instantiates objects and methods, IDEA thinks they don\'t exist w

2条回答
  •  情歌与酒
    2021-02-09 03:25

    This is the solution that worked for me: https://github.com/Stunt/Codeigniter-autocomplete/

    I'm using phpStorm but I imagine it would work with IDEA.

    No need to mark files as plain text. Just drop the autocomplete.php file into the application/config folder and it works. I doubt the link at github will go bad but just in case here is the content of the file.

    
    

    UPDATE for CIv3: If you are using CodeIgniter V 3.x, use this instead.

      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.
    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,
    replacing them with the data in the second param * @property CI_Profiler $profiler This class enables you to display benchmark, query, and other data
    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
    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.
    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.
    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,
    replacing them with the data in the second param * @property CI_Profiler $profiler This class enables you to display benchmark, query, and other data
    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
    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 {};

    I cannot take credit for all of this. I found a lot of these but do not recall where. I did need to add some to make it complete though.

提交回复
热议问题