PHP Docblocks - Explaining an array [duplicate]

谁说胖子不能爱 提交于 2019-12-07 07:15:11

问题


Possible Duplicate:
Is there a way for phpDoc to document an array of objects as a parameter?

I've been searching, and looked at the phpDocumentor documentation but cannot find if there is a way to properly document @param array (as in, declare the keys / values types expected) that will be parsed and included in any generated documentation.

This would lead me to believe there is no way to do it and I'll be resigned to using the description.

Thanks in advance.


回答1:


@param YourType[] is recognized by at least Eclipse/Zend Studio. I don't know about other IDE's but would expect the same, even if that might not be official phpDocumentor syntax.

However I don't know of any way to document the types of the keys (which are limited to int and string anyway).



来源:https://stackoverflow.com/questions/14612773/php-docblocks-explaining-an-array

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!