3

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

4
  • What about the ignore switch? I haven't used the Zend framework, but I've used the ignore switch to ignore other third party libraries. manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/… Commented Apr 22, 2011 at 18:56
  • @Paul: I didn't now about it, and it seems nice, but in order to do that, we have, for each project, to change netbeans phpdoc command, to ignore that project specific zend library folder. Not very practical I believe. Commented Apr 23, 2011 at 15:02
  • I was under the impression that the PHPDoc command was a global option in Netbeans and not per Project. The ignore switch allows patterns, so it should be something like /Zend. If I'm incorrect and the options are per project, I'd suggest editing the project files directly (project.properties). I've that before when making many changes to the PHPUnit options (just make sure that Netbeans is closed and you backup the project files of course). Commented Apr 25, 2011 at 13:15
  • @Paul - Indeed, when you edit the PHPDoc configuration, you do it on a not project related place. But in order to generate and actually use that code, you must do so under a context menu over your project name. Since we want to ignore Library/Zend and since all Zend projects will have this structure, perhaps, as you say that could be done. I will give it a try. (In the meanwhile I've created a bash process for doing the command on the question). You can well provide your answer as I believe if it works, it will fit the propose. Commented Apr 25, 2011 at 16:53

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

1 Comment

If we go to: Tools > Options > Php > PhpDoc and we put:/usr/bin/phpdoc -i library/,Zend -o HTML:frames:earthli we will have it working properly. PLEASE NOTE THE comma there, for different directories. Credits go to: stackoverflow.com/questions/362328/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.