使用PHP documentor记录常量

时间:2012-12-28 13:54:08

标签: php documentation constants phpdoc

  

可能重复:
  phpDoc class constants documentation

我在项目配置文件中定义了几个常量。常量在文件中都有很好的评论,但phpdocumentor没有显示我给每个人的描述。我想知道哪种方法可以使我对常量的描述出现在文档中。这是我的代码:

/**
 * PROGRAM CONSTANTS
 * 
**/
// The directories will be stored as constants
/**
 *  PROGRAMHOME_DIR holds the absolute path to the home directory
**/
define( 'PROGRAMHOME_DIR', $_SERVER[ 'DOCUMENT_ROOT' ] . str_replace( array( '/', '\\' ), DIRECTORY_SEPARATOR, $base_dir ) );
/**
 * PROGRAMIMAGES_DIR holds the absolute path to the images directory
**/
define( 'PROGRAMIMAGES_DIR', PROGRAMHOME_DIR . str_replace( array( '/', '\\' ), DIRECTORY_SEPARATOR, $images_dir ) );
/**
 * PROGRAMLANG_DIR holds the absolute path to the languages directory
**/
define( 'PROGRAMLANG_DIR', PROGRAMHOME_DIR . str_replace( array( '/', '\\' ), DIRECTORY_SEPARATOR, $lang_dir ) );
/**
 * PROGRAMPHP_DIR holds the absolute path to the php directory
**/
define( 'PROGRAMPHP_DIR', PROGRAMHOME_DIR . DIRECTORY_SEPARATOR . 'php' );
/**
 * PROGRAMCLASS_DIR holds the absolute path to the class directory
**/
define( 'PROGRAMCLASS_DIR', PROGRAMHOME_DIR . DIRECTORY_SEPARATOR . 'class' );
/**
 * PROGRAMREMOTE_URL holds the remote URL to the program
**/
define( 'PROGRAMREMOTE_URL', 'http://' . $_SERVER[ 'HTTP_HOST' ] . str_replace( array( '/', '\\' ), DIRECTORY_SEPARATOR, $base_dir ) );

0 个答案:

没有答案