Hello all,
My question isn't about php, but the php docs.
I have several php classes that extend a base class.
This class has a static method that returns a object based on the extending class that calls this method
How can I add php docs that my editor knows that when I call this function on 1 class, that I get a object of a specific class in return?
Right now I'm passing the "super" class of that object, but it would to great to be more accurate.
If the above explenation isn't clear, this is a example of what I want to do
php class User extends BusinessClass
php class FUser extends FinderClass
when I call User::Find() => autocomplete shows info of FinderClass
I want it to show info of FUser.
current code:
/**
* Static function that creates a "Find" static function to each business object, which in turn is basicly a shortkey to get The Findertype, or when an ID is passed, to get the object by that ID
* @return BusinessClass|FinderClass
*/
final public static function & Find($id = null) {
Adding the following line above my User class result in the correct object types, but the function is no longer detected as available in autocomplete
/**
* @method User|FUser Find(Integer $id) Find a object by ID, or return the object finder.
*/
Autocomplete on "User::" no longer shows Find as a available function
Thx for any help