反射DocBlock QQ 导 言 -- -- -- -- phpDocumentor的反射道克钟组件提供了道克Block 剖析..
反射DocBlock QQ 导 言 -- -- -- -- phpDocumentor的反射道克钟组件提供了道克Block 剖析..
导言
phpDocumentor 的反射DocBlock组件提供了一个 DocBlock 解析器 100%符合PHPDoc标准.
使用此组件, 库可以通过 DocBlocks 提供注释支持 或以其他方式获取嵌入在 DocBlock 中的信息。
安装
(原始内容存档于2019-09-29) (英语). ```bash composer require phpdocumentor/reflection-docblock
使用量
- - - - - - 说说看
为了分析 DocBlock , 需要一个 DocBlock Factory , 它可以是
使用这种“创造Instance”的工厂方法:
ZZ1ZZ
然后,我们可以使用工厂的 " 创造 " 方法来解释多克布洛克.
请注意,还有可能提供具有以下特征的类别:
“ getDoc” 方法,例如“ReflectionClass” 类型的对象,
创建方法将读取,如果它存在。
(原始内容存档于2019-09-29). ```php
$docComment = <<<DOCCOMMENT
/**
* This is an example of a summary.
*
* This is a Description. A Summary and Description are separated by either
* two subsequent newlines (thus a whiteline in between as can be seen in this
* example), or when the Summary ends with a dot (`.`) and some form of
* whitespace.
*/
DOCCOMMENT;
$docblock = $factory->create($docComment);“ 创建” 方法将生成 XQphpDocumentor\ reflection\ DocBlock 类型的对象 。 可以质疑其方法:
ZZCODE3 乐团
关于更多的例子,最好在[`/docs/examples'文件夹] (/docs/examples)中审查脚本.
带有前缀 @ 的 InvalidTag 名称
为 `@template-extends` 和 `@template-implements` 添加工厂
BUG: @example 标签不起作用
添加 @template 和条件返回类型
当出现无效标签时,添加更多信息以及指向 phpDocumentor 文档的链接
使用嵌套大括号的内联标签处理没有按预期工作
在 docblock 中使用 @see $varname 引用全局变量会导致
支持注解式标签
匿名类无法解析 FQSEN
标签的位置信息