Doxygen在记录PHP时出现奇怪的问题,如果
|
我在尝试记录我的项目时遇到一个奇怪的问题。我有以下代码:
//! Set default ::$action for called controller. If no action is called, default (index) will be set.
$action = isset($_GET[ \'action\']) ? $_GET[ \'action\'] : \'index\';
if ($action) {
echo \'something 1\';
}else{
echo \'something 2\';
}
//! Set default ::$action2 for called controller. If no action is called, default (index) will be set.
$action2 = isset($_GET[ \'action\']) ? $_GET[ \'action\'] : \'index\';
//! Set default ::$action3 for called controller. If no action is called, default (index) will be set.
$action3 = isset($_GET[ \'action\']) ? $_GET[ \'action\'] : \'index\';
Doxygen生成以下内容:
您可能会看到,缺少$ action2。我检查了其他文件之一,并看到了相同的问题。 if
语句之后的下一件事永远不会被记录,但是那之后的那件事将被记录。如果从上面的示例中删除if
语句,我将获得有关所有4个变量的文档-$page
,$action
,action2
和action3
。
我花了大量时间试图理解到底是什么问题,但是没有运气,因此欢迎大家提出建议。
系统是:
装有Doxygen 1.7.4的Windows XP x64。 (我正在使用Doxygen GUI)
更新
另外,当我的代码中有类似的内容时(请注意if
语句缺少else
)。但是,当我添加“ 9”时,它可以工作。下一个$variables
不再记录,但该更新与if/else
有关。
Doxygen将其转换为此
没有找到相关结果
已邀请:
3 个回复
肉簧咸缮
超可林
但是,我不知道这是否会导致doxygen的解析出现其他问题。 2)我在我的c ++项目中使用doxygen,但在我的php项目中使用phpdoc,因为它的效果更好。如果出于政治或实际原因不与氧气联系在一起,则可以考虑做同样的事情。
豪抱怒掳