最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

什么是phpDocumentor

 更新時間:2008年09月25日 09:17:35   作者:  
PHPDocumentor是一個用PHP寫的工具,對于有規(guī)范注釋的php程序,它能夠快速生成具有相互參照,索引等功能的API文檔。

7. 總結(jié)
phpDocumentor是一個非常強大的文檔自動生成工具,利用它可以幫助我們編寫規(guī)范的注釋,生成易于理解,結(jié)構(gòu)清晰的文檔,對我們的代碼升級,維護,移交等都有非常大的幫助。
關(guān)于phpDocumentor更為詳細的說明,可以到它的官方網(wǎng)站
http://manual.phpdoc.org/查閱

8.附錄
附錄1:
能夠被phpdoc識別的關(guān)鍵字:

Include
Require
include_once
require_once
define
function
global
class

附錄2
文檔中可以使用的標(biāo)簽
<b>
<code>
<br>
<kdb>
<li>
<pre>
<ul>
<samp>
<var>

附錄三:
一段含有規(guī)范注釋的php代碼
<?php
/**
* Sample File 2, phpDocumentor Quickstart
*
* This file demonstrates the rich information that can be included in
* in-code documentation through DocBlocks and tags.
* @author Greg Beaver <cellog@php.net>
* @version 1.0
* @package sample
*/
// sample file #1
/**
* Dummy include value, to demonstrate the parsing power of phpDocumentor
*/
include_once 'sample3.php';

/**
* Special global variable declaration DocBlock
* @global integer $GLOBALS['_myvar']
* @name $_myvar
*/
$GLOBALS['_myvar'] = 6;

/**
* Constants
*/
/**
* first constant
*/
define('testing', 6);
/**
* second constant
*/
define('anotherconstant', strlen('hello'));

/**
* A sample function docblock
* @global string document the fact that this function uses $_myvar
* @staticvar integer $staticvar this is actually what is returned
* @param string $param1 name to declare
* @param string $param2 value of the name
* @return integer
*/
function firstFunc($param1, $param2 = 'optional')
{
static $staticvar = 7;
global $_myvar;
return $staticvar;
}

/**
* The first example class, this is in the same package as the
* procedural stuff in the start of the file
* @package sample
* @subpackage classes
*/
class myclass {
/**
* A sample private variable, this can be hidden with the --parseprivate
* option
* @access private
* @var integer|string
*/
var $firstvar = 6;
/**
* @link http://www.example.com Example link
* @see myclass()
* @uses testing, anotherconstant
* @var array
*/
var $secondvar =
array(
'stuff' =>
array(
6,
17,
'armadillo'
),
testing => anotherconstant
);

/**
* Constructor sets up {@link $firstvar}
*/
function myclass()
{
$this->firstvar = 7;
}

/**
* Return a thingie based on $paramie
* @param boolean $paramie
* @return integer|babyclass
*/
function parentfunc($paramie)
{
if ($paramie) {
return 6;
} else {
return new babyclass;
}
}
}

/**
* @package sample1
*/
class babyclass extends myclass {
/**
* The answer to Life, the Universe and Everything
* @var integer
*/
var $secondvar = 42;
/**
* Configuration values
* @var array
*/
var $thirdvar;

/**
* Calls parent constructor, then increments {@link $firstvar}
*/
function babyclass()
{
parent::myclass();
$this->firstvar++;
}

/**
* This always returns a myclass
* @param ignored $paramie
* @return myclass
*/
function parentfunc($paramie)
{
return new myclass;
}
}
?>

相關(guān)文章

最新評論

辽阳县| 兴海县| 肇州县| 普宁市| 千阳县| 荔浦县| 筠连县| 丰台区| 沙坪坝区| 兴文县| 嵊州市| 贵港市| 莒南县| 潮安县| 满洲里市| 商丘市| 汶川县| 革吉县| 万州区| 铜鼓县| 云南省| 松潘县| 阳高县| 会同县| 资阳市| 花垣县| 方城县| 苗栗市| 郁南县| 临城县| 宁夏| 巴塘县| 丽江市| 怀集县| 白沙| 台北市| 昌邑市| 泸水县| 大冶市| 泽普县| 镶黄旗|