11
確定我確實有這個PHPDoc的我上面的類方法的兩個或兩個以上的數據類型
/**
* this a function that translates the text
* @param string|boolean $lang if string the string given in the parameter will be the language code that will represent the language desired, if true, this will translate based on the website's current language, if false will not translate.
*/
現在我的問題是,我是如何定義的$lang
的數據類型可以接受字符串和僅布爾值。
在其他文檔中,我看到了mixed
,但在我的Eclipse IDE中沒有正確反映PDT。
我的問題是什麼標準方式我怎麼可以顯示某個@param
可能接受兩種或更多種數據類型。
注意:我給出的phpdoc是我現在正在使用的應用程序的現有文檔。那麼我被分配好記錄一切。
ahh ..好吧,我只是擔心爲什麼日食PDT不能很好地顯示它。好的,謝謝 – 2012-07-26 05:55:59
@Mahan它是否顯示與「@param integer」或「@param boolean」不同的地方? – 2012-07-26 06:00:35
我認爲PDT在解釋PHP文檔塊已經發展到的所有內容方面仍有一些進展。也許一個研究來構建每個PDT版本知道如何使用多少docblock信息的總結是爲了順序。 – ashnazg 2012-07-26 15:52:20