title: PHP docBlock @return className
body: <p>How do I create a PHP DocBlock stating an @return which states the return of a class. This is at the moment fairly simple by doing</p>
  
  <pre class="lang-php prettyprint-override"><code>/**
  * This returns an object of the "User" class
  * @return User
  */
  public function getUser() { return $this-&gt;user; }
  </code></pre>
  
  <p>I use this to get intellisense through my IDE for these return values. (in my case Netbeans)</p>
  
  <p>However I have a class that returns a class based on a variable name. (for example:)</p>
  
  <pre class="lang-php prettyprint-override"><code>/**
  * This returns an object of the $param
  * @param String $className
  * @return ???
  */
  public function getSomeObject($className) { return new $className(); }
  </code></pre>
  
  <p>and I'm trying to create intellisense for this aswell but I'm not sure if this is actually possible.</p>
  
  <p>For example when I call</p>
  
  <pre class="lang-php prettyprint-override"><code>$someClass = new MyClass();
  $var = $someClass-&gt;getSomeObject('Address');
  </code></pre>
  
  <p>I would like my IDE to show me intellisense for the variable $var(which will contain an Object of Address)</p>