PHP Docblocks-解释数组 [英] PHP Docblocks - Explaining an array

查看:65
本文介绍了PHP Docblocks-解释数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
那里phpDoc记录对象数组作为参数的一种方法?

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

我一直在搜索,并查看了phpDocumentor文档,但是找不到是否有一种方法可以正确地解析@param数组(例如,声明预期的键/值类型),并将其解析并包含在任何生成的方法中文档.

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.

先谢谢了.

推荐答案

@param YourType[].我不了解其他IDE,但即使可能不是官方的phpDocumentor语法,也会期望得到相同的结果.

@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.

但是我不知道有什么方法可以记录键的类型(无论如何,键的类型仅限于int和string).

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

这篇关于PHP Docblocks-解释数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆