PHP docBlock @return className
问题 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 /** * This returns an object of the "User" class * @return User */ public function getUser() { return $this->user; } I use this to get intellisense through my IDE for these return values. (in my case Netbeans) However I have a class that returns a class based on a variable name. (for example:) /** * This returns an object of the $param * @param String $className *