Doxygen: How to document PHP constants?

你。 提交于 2019-12-10 18:49:42

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!