给你的PHP函数和类添加标准的注释说明

来源:百度文库 编辑:神马文学网 时间:2024/04/28 23:06:14

让你编写的PHP函数(function)和类(class)拥有符合规范的注释,符合PHPDOC的标准,特搜集整理如下:
[coolcode lang="PHP"]
/**
* Comment for PHP.
* @access public
* @param String $title Title Name of the Field
* @param Int $id Id of the field
* @param Array $attributes Additional attributes you want to add in format;
* @param Object $obj Obj of the field
* @param Resource $handle Handle of the field
* @param DOMDocument $dom Dom of the field
* @param String|Array $put Put of the field
* @param Mixed $type Type of the field
* @return void|bool Result
* @desc Example of the PHP function&class comment.
*/

[/coolcode]