[Doxygen-users] Undocumented feature: ParamArrays in PHP
Brought to you by:
dimitri
From: Willem B. <w-...@dd...> - 2017-03-06 10:29:50
|
In PHP, you can use the func_get_args() function to read all the parameters to a function or method. This can be used to build functions that accept any number of parameters, like the ParamArray construct in languages like Visual Basic. When I was looking for a way to document such a construct in Doxygen, I could not find it in the documentation. However, I found a way to do it in PHPCodumentor, and I bluntly tried that in Doxygen. And it worked! If you append ",..." to a parameter name in PHP, Doxygen will produce the right output and there is no warning it cannot find that appended parameter. For example: /// @brief select values immediately. /// @details Any preselected keys are also selected, /// This allows values to be requested in batches. /// @param[in] mixed $mixKeyValue,... The key of the record to schedule. /// May by used as ParamArray. public function Select($mixKeyValue=NULL) {} It would be nice it this feature could be included in the documentation as well. Best regards, Willem Bogaerts. |