如何将 phpDocumentor 中的文档直接提取到 MySQL 中
我想制作自己的文档查看器,但是 PHPDOC (JavaDoc) 格式非常适合我定义结构。
有没有一个项目可以从源文件中获取 PHPDOC 标签并将其简单地存储到 SQL 中?
I would like to make my own documentation viewer, however the PHPDOC (JavaDoc) format suits me quite well for defining structure.
Is there a project to harvest PHPDOC tags from the source files and simply store it into SQL?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有人为 phpDocumenter https://github.com/phpDocumentor/ReflectionDocBlock 组合了一个基于反射的 docblock 工具可能有用。对我来说,我将其封装成一个工具,用于从 SQL、Javascript 和 css 等奇怪文件中抓取文档,以便包含到更大的文档中。已经有一段时间了,但只要文件可访问,该方法就确实有效;即,获取文件列表,循环遍历它们,提取 docBlocks,做任何事情,然后继续下一种方法。
Someone put together a reflection based docblock tool for phpDocumenter https://github.com/phpDocumentor/ReflectionDocBlock that can be useful. For me, I wrapped this into a tool for grabbing docs out of odd files like SQL, Javascript, and css for inclusion into larger documentation. It's been a while ago, but the approach did work as long as the file is reachable; ie, get a list of files, loop through them, extract the docBlocks, do whatever, move on to the next one kinda of approach.