PHPdoc @param中的两个或多个数据类型
发布时间:2020-12-13 14:08:29 所属栏目:PHP教程 来源:网络整理
导读:好的,我有这个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 wi
好的,我有这个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的数据类型. 在其他文档中,我看到混合,但它没有正确地反映在我的Eclipse IDE与PDT. 我的问题是如何显示一个@param可以接受两种或更多类型的数据类型的标准方法是什么. 注意:我给出的phpdoc是我现在正在工作的应用程序的现有文档.那么我被分配好记录一切.
你做的正确
PHPDoc reference给出了这两个可以是多种数据类型(重点在于我)的参数选项.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |