ApiGen support added

Hi all, today we would like to show you how you can generate very nice API documentation of your projects with ApiGen.

Citation from http://apigen.org/:
ApiGen is the tool for creating professional API documentation from PHP source code, similar to discontinued phpDocumentor/phpDoc.

It works the same way as the current PhpDoc support. So, please install it and just verify in Tools > Options > PHP > ApiGen that NetBeans is able to detect it correctly (this should work for PEAR installation); if not, simply select the ApiGen script manually using the Browse button:

ApiGen IDE Options

Next, verify that ApiGen properties of your project are also correct:

ApiGen Project Properties

As you can see, a configuration file can be provided. This configuration file is in the Neon format, which NetBeans supports as well.

If everything is as you wish, just generate the API documentation:

Generate documentation via ApiGen

NetBeans will inform you about the progress in the Output Window:

ApiGen in work

If the process is successful, your WWW browser is opened with the generated documentation:

Generated Documentation

That's all for today, as always, please test it and report all the issues or enhancements you find in NetBeans BugZilla (component php, subcomponent ApiGen).


How to install the ApiGen support in NetBeans? I doesn't have it yet and there seems to be no plugin.

There are some plugins in the net, but they don'T look like the Screens.

Posted by Daniel Siepmann on January 12, 2012 at 08:20 AM CET #

@Daniel Siepmann: This blog is mostly about features available in the development version of NetBeans [1] (so they will be part of the next stable version of NetBeans).

[1] http://bits.netbeans.org/download/trunk/nightly/latest/

Posted by Tomas Mysik on January 12, 2012 at 08:23 AM CET #

@Tomas Mysik: Thanks

Posted by Daniel Siepmann on January 12, 2012 at 08:26 AM CET #

@Daniel Siepmann: You are welcome.

Posted by Tomas Mysik on January 12, 2012 at 08:28 AM CET #


thanks for useful introduction. Great tool.

Posted by vgrigory on January 18, 2012 at 12:44 AM CET #

Note for users that are having problems installing Nette (which is a dependency of ApiGen) through PEAR:

The package.xml of Nette seems to have an error in it. (And yes, I updated all the channels and all PEAR packages.)

What worked for me was editing the package.xml, and putting a <notes/> tag just before <content/>. Also note that <notes/> cannot be empty (why???). So just put something like <notes>My note</note>.

After that create a new archive, and install it using "pear install mynette.tgz"

Posted by Maghiel Dijksman on January 20, 2012 at 05:07 PM CET #

I had no trouble installing Nette through PEAR. Maybe they've fixed that bug.
However running ApiGen from NetBeans fails for me with "Option --template-config expects value" error

Posted by JeffRubinoff on January 26, 2012 at 06:37 PM CET #

Well it looks like there was something odd with my PEAR installation of ApiGen. It was through the PEAR in XAMPP and frankly I've had issue with it in the past.
The standalone ApiGen worked fine for me.

Posted by JeffRubinoff on January 30, 2012 at 01:56 PM CET #

I am running Netbeans 7.1 under Windows Xp Pro. I have downloaded the Apigen plugin for Netbeans from "Netbeans Plugin Portal"

When trying to install it Netbeans says :
1.- Some plugins require plugin PHP APIs to be installed
2.- Some plugins require plugin PHP PROJECT to be installed

What shall I do??

Posted by guest on February 05, 2012 at 08:55 PM CET #

@guest: Hard to say since you have downloaded some other ApiGen plugin; the plugin from this blog post is available only in the development version of NetBeans (which will become NB 7.2 one day). Of course, you can already try it, the download link is in the blog post.

Posted by Tomas Mysik on February 06, 2012 at 08:58 AM CET #


i would like to know how to disable the buildin ApiGen support in the current development version of Netbeans.
I am using a windows system and the buildin ApiGen could not being configured to work anyway.

Btw. ApiGen with a modified ApiGen.bat/cmd (doing parameter mapping) works as expected with the additional phpDoc plugin.

Posted by guest on February 15, 2012 at 09:49 AM CET #

@guest: Sorry, I don't fully understand what you mean exactly. Could you please submit a bug [1] with steps to reproduce?

[1] http://netbeans.org/community/issues.html

Posted by Tomas Mysik on February 15, 2012 at 10:06 AM CET #

You said, and quoting:
the plugin from this blog post is available only in the development version of NetBeans (which will become NB 7.2 one day)

I'm presently running stable 7.2, wich I was hopping that it had apigen plugin.
Looks like it doesn't, neither I can get it from central plugins repository, or maybe I'm missing something...

Do I have to install current night build in order to "play" with apigen plugin?

Thanks anyway, for all the knowledge you've been throwing at us
Best regards

Posted by guest on September 04, 2012 at 11:44 AM CEST #

@N.C.: Just download NB 7.2, open your PHP project and invoke "Generate Documentation" in its context menu. ApiGen settings can be found in Tools > Options > Php > ApiGen.

Posted by Tomas Mysik on September 04, 2012 at 02:38 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed

This blogs is written by NetBeans developers who contribute to the PHP support mainly.


« April 2015