问题
How to document PHP constants:
define('SOME_CONSTANT', 'constant value');
with Doxygen?
回答1:
Just include a documentation block above the constant define()
function call or const
keyword like this:
<?php
/**
* Short Break Adventure Trip Sub Type Id
*/
const TRIP_SBA = 1;
/**
* Small Group Adventure Trip Sub Type Id
*/
define('TRIP_SGA', 2);
?>
回答2:
Not sure if it's what you are looking, but you can use the Define macro
\def <name>
Something like:
/*!
\def SOME_CONSTANT
some constant documentation
*/
来源:https://stackoverflow.com/questions/7223832/doxygen-how-to-document-php-constants