0

This is my first project with CodeIgniter. I have a problem with autocomplete with Netbeans 8.0.1. I found the answers for this question, but they not working for me.

I Try these solutions but not working for me

How to integrate codeIgniter with netbeans fully

NetBeans 8.0 PHP CodeIgniter Framework support

Netbeans code completion for CodeIgniter

When I try to add folder to PATH there are following ERROR:

Shared: Path D:\MyProjects\project\autocomplete is already part of project.

enter image description here

CI_Autocomplete.php

    <?php
    /**
    * @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
    */

    class 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 {};
?>
Community
  • 1
  • 1
dido
  • 2,330
  • 8
  • 37
  • 54

2 Answers2

4

Follow these steps

  1. Create Autocomplete in outside of the application folder.
  2. Inside that create CI_autocomplete.php file
  3. Inside CI_autocomplete.php add below code (Can download here)

    <?php
        /**
        * @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
        */
    
        class 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 {};
    
    
    ?>
    
  4. Goto

    • Tools
    • plugins
    • Installed
      1. Uninstall - PHP CakePHP Framework (Option on Uninstall restart IDE later)
      2. Deactivate - PHP CI Framework Repositary (Option on Uninstall restart IDE later)

All fine. As simple go to your controller type $this->load-> you can see the suggestions Like below image

01

Abdulla Nilam
  • 36,589
  • 17
  • 64
  • 85
3

please note CI_DB_active_record change in codeigniter 3.

put

@property CI_DB_query_builder $db

instead of

@property CI_DB_active_record $db
Jérome S.
  • 127
  • 1
  • 7