I am writing relatively complex PHP applications and have several files for class definitions formatted as follows:
<?php
if(!class_exists("FooBar"))
{
/**
* This is documentation for the class FooBar
*/
class FooBar
{
/**
* Documentation for FooBar's constructor
*/
public function __construct() {
;
}
}
} // class_exists
This is to prevent multiple definition errors with complex class hierarchies and applications.
However, Doxygen does not document any classes that are specified this way. Commenting out or removing the if(!class_exists()) statement causes Doxygen to correctly document this class, but introduces errors with applications.
Is there any way I can force Doxygen to generate documentation for these classes?
ifblocks) is a really, really bad idea. If you have a large/complex code base then you should be using namespaces to organize your code. In other words, you should not be trying to somehow force Doxygen to handle bad practices; you should not be using bad practices to begin with.