How to generate PHPDoc tags automatically?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
jstuardo
Forum Newbie
Posts: 3
Joined: Thu May 18, 2006 6:31 pm

How to generate PHPDoc tags automatically?

Post by jstuardo »

hello..

I have seen that, for example, a class may have at the beginning of the file:

Code: Select all

 
/**
 * YiiBase class file.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @link http://www.yiiframework.com/
 * @copyright Copyright &copy; 2008-2009 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 * @version $Id: YiiBase.php 1316 2009-08-09 04:11:25Z qiang.xue $
 * @package system
 * @since 1.0
 */
 
Is there a way to generate those tags by mean of a tool? By reading @version line, there's a number after the filename, and the date and time including seconds. I don't think that information is entered manually by a human, it's more likely to be entered by certain automatic tool.

Thanks
Jaime
cpetercarter
Forum Contributor
Posts: 474
Joined: Sat Jul 25, 2009 2:00 am

Re: How to generate PHPDoc tags automatically?

Post by cpetercarter »

They are inserted manually by the programmer, but later read by phpDocumentor to generate documentation for the programme as a whole.
jstuardo
Forum Newbie
Posts: 3
Joined: Thu May 18, 2006 6:31 pm

Re: How to generate PHPDoc tags automatically?

Post by jstuardo »

Hello!

So, this line

Code: Select all

 
* @version $Id: YiiBase.php 1316 2009-08-09 04:11:25Z qiang.xue $  
 
is inserted later by phpDocumentor? what does the number 1316 mean? I thought it was the file size, but it isn't.

Thanks
Jaime
cpetercarter
Forum Contributor
Posts: 474
Joined: Sat Jul 25, 2009 2:00 am

Re: How to generate PHPDoc tags automatically?

Post by cpetercarter »

As the code developer, you need to place the relevant information, in the correct form, at the top of every script, function, class etc. You can then use phpDocumentor to generate documentation for your programme as a whole. If you need to know more, then google "phpDocumentor" and start reading.
BMatt
Forum Newbie
Posts: 1
Joined: Sun May 31, 2009 12:37 pm

Re: How to generate PHPDoc tags automatically?

Post by BMatt »

jstuardo wrote:Hello!

So, this line

Code: Select all

 
* @version $Id: YiiBase.php 1316 2009-08-09 04:11:25Z qiang.xue $  
 
is inserted later by phpDocumentor? what does the number 1316 mean? I thought it was the file size, but it isn't.

Thanks
Jaime
That information is created by SVN and refers to the file that was modified (YiiBase.php), the revision that it was last modified in (1316), the date it was modified(2009-08-09 04:11:25Z), and the author(qiang.xue).

See here for more info http://svnbook.red-bean.com/en/1.4/svn. ... words.html
jstuardo
Forum Newbie
Posts: 3
Joined: Thu May 18, 2006 6:31 pm

Re: How to generate PHPDoc tags automatically?

Post by jstuardo »

Thanks a lot... that was just what I was looking for.

cheers
Jaime
Post Reply