This forum has been archived. All content is frozen. Please use KDE Discuss instead.

class hinting for auto-complete? (php)

Tags: kdeveloper, php, codecomplete, hints kdeveloper, php, codecomplete, hints kdeveloper, php, codecomplete, hints
(comma "," separated)
User avatar
puggan
Registered Member
Posts
1
Karma
0
OS
1. if I have a global variable $db that always is a object of the class "database", can I somehow hint that for kdeveloper, so I get the correct automcomplete when i write "$db->".

2. if i have a function/method "foo()" that always return a object of class "bar", can I somehow hint that for kdeveloper, so I get the correct automcomplete for bar when i write "$a->foo()->".

(Added 2015-05-11:)

If there was a "@class"-parameter, you could have a hinting system like this:
Code: Select all
/// @class database_system
$database = $system->database();

class systems
{
   /// @class database_system
   function database()
   {
      if(!$this->systems['database'])
      {
         $this->systems['database'] = new database_system();
      }

      return $this->systems['database'];
   }
}


Dose a system like this alredy exists, or shuold i add it to some kind of wishlist?


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]