Doxygen:如何记录PHP常量?

3
如何记录PHP常量:
define('SOME_CONSTANT', 'constant value');

使用Doxygen进行文档编写?
2个回答

3

只需在常量define()函数调用或const关键字之前加上文档块,如下所示:

<?php

/**
 * Short Break Adventure Trip Sub Type Id
 */ 
const TRIP_SBA = 1;

/** 
 * Small Group Adventure Trip Sub Type Id
 */ 
define('TRIP_SGA', 2);

?>

同样的方法适用于记录类常量。 - Shi

0

不确定这是否是您要找的,但您可以使用Define宏。

   \def <name>

类似这样:

  /*!
    \def SOME_CONSTANT
    some constant documentation
  */

不,@def 不是你想要的。我相信那是指C语言结构。 - Christopher

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接