Page 1 of 1
How to generate PHPDoc tags automatically?
Posted: Sun Aug 30, 2009 8:59 pm
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 © 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
Re: How to generate PHPDoc tags automatically?
Posted: Mon Aug 31, 2009 12:58 pm
by cpetercarter
They are inserted manually by the programmer, but later read by
phpDocumentor to generate documentation for the programme as a whole.
Re: How to generate PHPDoc tags automatically?
Posted: Mon Aug 31, 2009 11:06 pm
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
Re: How to generate PHPDoc tags automatically?
Posted: Thu Sep 03, 2009 1:53 am
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.
Re: How to generate PHPDoc tags automatically?
Posted: Thu Sep 03, 2009 5:26 pm
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
Re: How to generate PHPDoc tags automatically?
Posted: Thu Sep 24, 2009 11:08 am
by jstuardo
Thanks a lot... that was just what I was looking for.
cheers
Jaime