In this section, we will add a PHP class using NetBeans and update the preceding DocBlock with class documentation tags. So let's go for it...
1. Right-click on the
Chapter5
project to choose New | PHP Class..., insert the class name asTest
into the File Name box, and click on Finish, as follows:2. The
Test
class should look similar to the following:In the previous screenshot, you can see that the opened
Test class
has an added DocBlock at the top with a sample class description along with the@author
tag.3. You may want to add PHPDoc tags before the line containing the
@author
tag; say you want to add the@package
tag as soon as you type@p
. The NetBeans code auto completion feature shows tags starting with@p
to have a description that looks similar to the following screenshot:4. Update the DocBlock with your own, so it looks similar to the following:
/** * Short description of the Test Class * * Long multiline description...