Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1060469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:19:54+00:00 2026-05-16T18:19:54+00:00

I am using Codeigniter framework for PHP. I was wondering if there is a

  • 0

I am using Codeigniter framework for PHP. I was wondering if there is a way to load methods in a Model for autocompletion using PHPDoc @property.

What I mean is ….

class abc_controller extends Controller {

  /**
   * @property Model1
   */
  function func() {
     $this->load->model("Model1"); // I am loading the model here

     $result = $this->Model1->getIds(); 
     // When I type Model1 in the statement above, it should popup 
     // an autocompletion box populated with all the methods of Model1
  }
}

I did something like this using NetBeans while working on Cakephp. I was wondering if such a thing is possible for CodeIgniter as well/

Regards

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T18:19:54+00:00Added an answer on May 16, 2026 at 6:19 pm

    You need to add property to your class phpdoc. Check this video out http://netbeans.org/kb/docs/php/class-property-variables-screencast.html

    <?php
    
    /**
     * blah blah balh
     *
     * @property Model1 Model1
     * @property <type> <name>
     */
    class abc_controller extends Controller {
    
        /**
         * blah blah blah
         */
        function func() {
            $this->load->model("Model1"); // I am loading the model here
    
            $result = $this->Model1->getIds();
            // When I type Model1 in the statement above, it should popup
            // an autocompletion box populated with all the methods of Model1
        }
    
    }
    
    ?>
    

    Or if you are getting a value from a function with a mixed return type you need to to it like this:

     function func(){
            $myObj =  $this->getMixedType();
            /* @var $myObj TypeOfMyObject */
    
            //  The vdoc has to be below the function call, otherwise the latest return type will be used
            //  Shortcut for generating vdoc is "vdoc" + tab
            //  For example if you have vdoc above the function call and function 
            //  returns Type1, then your object will have autocomplete for Type1.
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using CodeIgniter framework for PHP . There are some pages that are
I am using CodeIgniter framework for PHP. It requires that index.php should be there
I'm using the CodeIgniter PHP framework. I use JS to dynamically load a PHP
I'm using CodeIgniter (a PHP framework) to build an app, and I have an
I am using codeigniter framework. where should i sanitize PHP input - controller or
I'm developing a PHP application using CodeIgniter as the framework, and PostgreSQL as the
I am using codeigniter php framework. I am suffering from the problem that all
I am using Codeigniter PHP Framework with Tank Auth authentication library. In my config
I am using codeigniter framework for one of my PHP project. In form I
I have a web site done using codeigniter php framework and mysql, i have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.