欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

什么是phpDocumentor第2/2頁

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

7. 總結(jié)
phpDocumentor是一個(gè)非常強(qiáng)大的文檔自動(dòng)生成工具,利用它可以幫助我們編寫規(guī)范的注釋,生成易于理解,結(jié)構(gòu)清晰的文檔,對我們的代碼升級,維護(hù),移交等都有非常大的幫助。
關(guān)于phpDocumentor更為詳細(xì)的說明,可以到它的官方網(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)文章

  • php中并發(fā)讀寫文件沖突的解決方案

    php中并發(fā)讀寫文件沖突的解決方案

    在這里提供4種高并發(fā)讀寫文件的方案,各有優(yōu)點(diǎn),可以根據(jù)自己的情況解決php并發(fā)讀寫文件沖突的問題。
    2013-10-10
  • 什么是phpDocumentor

    什么是phpDocumentor

    PHPDocumentor是一個(gè)用PHP寫的工具,對于有規(guī)范注釋的php程序,它能夠快速生成具有相互參照,索引等功能的API文檔。
    2008-09-09
  • PHP程序員面試 切忌急功近利(更需要注重以后的發(fā)展)

    PHP程序員面試 切忌急功近利(更需要注重以后的發(fā)展)

    招聘一個(gè)程序員,唯一對你有意義的是他能寫出好程序的能力。 很少人像這樣去招人,他們更喜歡去挑剔程序員的個(gè)人癖好和性格缺點(diǎn)。
    2010-09-09
  • DedeCms模板安裝/制作概述

    DedeCms模板安裝/制作概述

    DedeCms模板安裝/制作概述...
    2007-03-03
  • WINXP下apache+php4+mysql

    WINXP下apache+php4+mysql

    WINXP下apache+php4+mysql...
    2006-11-11
  • 拋棄 PHP 代價(jià)太高

    拋棄 PHP 代價(jià)太高

    有效率地在AWS上部署是值得學(xué)習(xí)的但是怎樣簡單的去部署git服務(wù)?為了它我是否需要額外的服務(wù)?同樣的一個(gè)實(shí)例是否可以運(yùn)行多個(gè)應(yīng)用?收費(fèi)模型又是怎么樣的呢盡管看了他們的價(jià)格頁面,我還是不明白哪一部分跟我相關(guān)??赐晁麄兙W(wǎng)站我心里還是有一堆的問號無法找到答復(fù)。
    2016-04-04
  • PHP 開發(fā)工具

    PHP 開發(fā)工具

    PHP 開發(fā)工具...
    2006-12-12
  • PHP如何解決網(wǎng)站大流量與高并發(fā)的問題

    PHP如何解決網(wǎng)站大流量與高并發(fā)的問題

    普通的P4服務(wù)器一般最多能支持每天10萬獨(dú)立IP,如果訪問量比這個(gè)還要大,那么必須首先配置一臺更高性能的專用服務(wù)器才能解決問題
    2011-06-06
  • PHP 已經(jīng)成熟

    PHP 已經(jīng)成熟

    這篇文章主要介紹了PHP 已經(jīng)成熟
    2006-12-12
  • php程序員應(yīng)具有的7種能力小結(jié)

    php程序員應(yīng)具有的7種能力小結(jié)

    php程序員應(yīng)具有什么樣的能力,才能更好的完成工作,才會有更好的發(fā)展方向呢?在中國我想您不會寫一輩子代碼的,那樣不可能,過了黃金期,您又怎么辦呢?看了本文后,希望對您有所幫助
    2014-11-11

最新評論