help function for pattern

Hello !

I need a tip.
I want to work with design patterns. For example, the dependency pattern.
Here's an example.


class model{

   public $subClass;

   public function setSubclass($objekt){
       $this->subClass = $objekt;


class test{

  public function getInfo(){
    return 'my info';


$model = new model();
$model->setSubclass(new test());
$info = $model->subClass->getInfo();


Unfortunately, the 'PhpStorm' not the autocompletion of the subclass.
Who can help?



1 comment
Comment actions Permalink

Hello Stephan,

It is not supported by PhpStorm yet. Please vote -

Thank you for feedback!


Please sign in to leave a comment.