In my framework, I have a method that returns an array with objects. It looks pretty much like this:
/**
* @return array Array with Action objects
*/
public function getActions() {
return $this->actions;
}
The user of this Class
will get an doc-popup when calling this method, which only says that this method will return an array. But that's it! Next, when the user gets an object out of the array, the IDE is plain stupid and doesn't know / suggest / autocomplete anything.
Is there anything I can do as a framework developer to make life of the framework users easier here? Or what else can I suggest them to do, so their IDE knows what kind of object is returned from the array?
Or in general: How to let the IDE know what kind of object came from the array, so that it can suggest what methods are available for that object?