phpDocumentor: There needs to be a way to indicate the containing class in function docblocks without explicitly entering the name of the class
For example when implementing a singleton:
class Singly {
/**
* Get the instance
* @return Singly
*/
public static function getInstance() {
// Some code here...
}
}
The @return Singly could instead be @return this, @return static or @return self or something like that.
This would be most useful for traits, which I know you are not focused on right now, but also useful in general: What if you have a function which returns $this and extend the implementing class? Then the function really returns an instance of the extending class, and this would be really useful to be able to determine for IDE auto completion.
About this issue
- Original URL
- State: closed
- Created 12 years ago
- Comments: 37 (24 by maintainers)
Commits related to this issue
- #514: Add support for 'static' — committed to mvriel/phpDocumentor2 by mvriel 12 years ago
@DavidBruchmann I have this, for now: