最近我一直在記錄我的課,其中一人已在其定義中沒有參數的方法,而是因爲我用get_func_args()
解析它們。讓我告訴你:
public function method()
{
if(func_num_args() == 2)
{
//...
}
}
的問題是,當我將其記錄下來,我想增加它接收哪些參數。事情是這樣的:
/**
* Some info
* @param string $arg Some value
* @param mixed $arg2 Some value
*/
之前問,我這樣做是與get_func_args()
的東西,因爲它擴展一個抽象類,因爲他們的觀點有點不同每個實現。
當我記錄這個類,它會彈出一個通知:
Parameter $arg could not be found in method()
任何辦法避免這一點,或者告訴phpDocumentor的,這個類有其實一些參數?
你想重載的功能? – Hanut
也許[內部](http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.internal.pkg.html)會有幫助嗎? '@internal @參數字符串$ arg' –
@Hanut不,它只是一個[可變參數函數(http://en.wikipedia.org/wiki/Variadic_function)。在抽象類其持有不確定的參數,但在每個擴展它的參數量可能會有所不同 – Korcholis