As I don't speak PHP I'll offer a possible Doxygen-related answer:
Try surrounding the wrapper components with \cond
commands that hide code from doxygen.
/** \cond */
if(!class_exists('FooBar', false)) {
/** \endcond */
/**
* Docs
**/
class FooBar
{
}
/** \cond */
}
/** \endcond */
I am unsure if this will work - it rather depends on the parsing order of Doxygen - but seems worth a try before you start opening the complications that modifying doxygen will introduce.