Doxygen: how to describe class member variables in php?

后端 未结 7 751
野性不改
野性不改 2020-12-14 19:47

I\'m trying to use doxygen to parse php code into xml output. Doxygen does not parse description of class member variables.

Here is my sample php file:



        
7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-14 20:30

    I am using an input filter to insert typehints from the @var annotation inline with variable declaration, and remove the @var annotation as it has different meaning in Doxygen. For more info, see bug #626105.

    As Doxygen uses C-like parser, when the input filter is run it can recognize types.

    This is a quick hack, and probably have bugs, it just works for my code:

    Doxygen @var PHP

    You can enable input filter with INPUT_FILTER option in your Doxyfile. Save the code above to file named php_var_filter.php and set the filter value to "php php_var_filter.php".

提交回复
热议问题