@access
由 lugir 于 星期四, 12/23/2010 - 15:09 发布
@access 控制 phpDocumentor 对元素的文档化操作
如果 @access 被设置为 private,只有在命令行下使用 --parseprivate 参数时才会对应用此标签属性的元素进行文档化
<?php
/**
* funciton func1, public access is assumed
*/
function func1()
{
}
/**
* function func2, access is private, will not be documented
* @access private
*/
function func2()
{
}
/**
* This is possible, but redundant. An element has @access public by default
* @access public
*/
class class1
{
/**
* all text in this DocBlock will be ignored, unless command-line switch or
* setting in a user INI file enable documenting of private elments
* @access private
*/
var $private_var;
/**
* Protected is allowed, but does absolutely nothing. Use it to inform users
* that an element should only be referenced by this and child classes,
* and not directly
* @access protected
*/
/**
* This funciton is documented
*/
function publicmethod()
{
}
}
?>
参考:http://pear.php.net/package/PhpDocumentor/docs/1.4.3/phpDocumentor/tutorial_tags.access.pkg.html