PHP Properties/Klassenvariablen in Doxygen dokumentieren
Zur Dokumentation von Klassenvariablen, auch Properties1 oder Member genannt
wird in Doxygen2 (u.a.) und PHPDoc3 (phpDocumentor 2) das Tag @var
4 5 verwendet.
In PHPDoc wird die folgende Notation verwendet, diese wird so auch in Drupals Coding-Standards6 beschrieben:
/**
* Passed command line options
* @var string
*/
protected $commandLineOptions;
…welche in Doxygen leider weder mit Typ noch mit dem zusätzlichen Kommentar angezeigt wird.
Um das gewünschte Ergebnis in Doxygen zu erzielen, muss hinter dem Typ noch redundanterweise der Name der Variablen7 notiert werden…
/**
* Passed command line options
* @var string $commandLineOptions
*/
protected $commandLineOptions;
Tada, Typ und der optionale Kommentar werden angezeigt.
Interessant ist vielleich auch noch Documenting PHP with Doxygen: The Pros and Cons8.