如何为 Netbeans IDE 中的特定文件夹生成 phpDoc 文档?
由于我们需要将 Zend Framework 集成到项目根目录中,并且生成该文档将毫无用处且需要很长时间,因此我只想为 application 文件夹中的所有文件生成文档。
有谁知道如何通过 Netbeans 7.0 界面为特定项目文件夹生成文档?
更新: 到目前为止我发现的最好方法是:
从 netbeans 打开终端窗口,然后输入:
sudo phpdoc -d public_html/yoursite.dev/application/ -t public_html/yoursite.dev/docs/
更新 2 假设我们的 Zend 库位于 projectrootname/library/Zend
中,我们也可以尝试,方法是:Tools >选项> php> PhpDoc
并放置以下内容:
/usr/bin/phpdoc -i library/Zend/ -o HTML:frames:earthli
至少对我来说,这似乎不起作用,因为当我尝试生成文档时,我在输出窗口上显示权限错误问题。
谢谢
Due to the fact that we need to integrate the Zend Framework on our project root, and that generating that documentation will be useless and take long time, I would like to generate documentation for all files inside application folder only.
Does anyone know how I can generate documentation for a specific project folder, trough Netbeans 7.0 interface?
Update:
The best I've found so far was to:
Open the terminal window from netbeans, and type:
sudo phpdoc -d public_html/yoursite.dev/application/ -t public_html/yoursite.dev/docs/
Update 2
Let's suppose our Zend library is inside projectrootname/library/Zend
we also can try, by going to: Tools > Options > Php > PhpDoc
and place the following:
/usr/bin/phpdoc -i library/Zend/ -o HTML:frames:earthli
At least for me, that doesn't seem to work, because, when I try to generate the documentation, I get permission error issues displayed on the output window.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
-d/--directory 选项 [1] 应用于突出显示您希望 phpDocumentor 开始读取的最高级别代码目录。如果您的 Zend 文件夹位于应用程序目录的级别或之上,那么仅使用
--directory /path/to/application
应该可以帮助您仅记录应用程序代码。如果您的 Zend 文件夹位于应用程序内部的某个位置(例如在应用程序的 ./lib 文件夹中),那么您可以使用 -i/--ignore 选项 [2] 告诉 phpDocumentor 它将看到但应忽略的任何目录,<代码>--忽略*zend*。请注意,格式化忽略值可能很棘手,因此请参阅手册中的示例。另外,请注意,当 phpDocumentor 运行时,您将看到这些被忽略的文件夹和文件列在输出中... phpDocumentor 通过不为这些文件生成文档来“忽略”它们。但是,它仍然需要解析它们,以防这些对象在确实记录的文件中引用。
[1] -- http: //manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#using.command-line.directory
[2] -- http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.howto .pkg.html#using.command-line.ignore
The -d/--directory option [1] should be used to highlight the most high-level code directory that you want phpDocumentor to start reading from. If your Zend folder is at or above the level of your application directory, then just using
--directory /path/to/application
should help you document only your application code.If your Zend folder is somewhere inside your application (e.g. in your app's ./lib folder), then you can use the -i/--ignore option [2] to tell phpDocumentor about any directories that it will see but should ignore,
--ignore *zend*
. Just be aware that formatting your ignore value can be tricky, so see the examples in the manual. Also, be aware that as phpDocumentor runs, you will see these ignored folders and files being listed in the output... phpDocumentor "ignores" them by not generating docs for those files. It does, however, still need to parse them, in case those objects are referenced in files that do get documented.[1] -- http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#using.command-line.directory
[2] -- http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#using.command-line.ignore