Best way to write contributions header in php and all available tags like @author

时间:2016-04-25 09:45:03

标签: php phpdoc

enter image description here

I am working on a GitHub project https://github.com/qzoke/isbn-converter I want to create a nice contribution header. So here are my questions :

  1. All the variables or whatever like @author available.

few that i know are:

@author
@license
@version
@package
@subpackage
  1. Best way to showcase values like

few use

@author www.website.com

few use

@author name<email>

and some just

@author name.
  1. How and what should be name for package and sub package. subpackage is confusing , no idea if i should use file name in subpackage or same package name.

  2. Is it ok to write description, keyword, contribution by in there.

  3. What's the best way to reference license, just name (like GNU GPL v3.0) or name+weblink or link to local copy or copy of whole license text.

  4. And which files should have such a header , just index.php , or header.php or every other.

  5. And what to include in html commenting , if any.

1 个答案:

答案 0 :(得分:1)

根据https://phpdoc.org/文档,https://phpdoc.org/docs/latest/index.html列出的phpDocumentor识别了许多标记。

示例来源https://phpdoc.org/docs/latest/references/phpdoc/tags/author.html

  

Syntax: @author [name] [<email address>]

     

@author标签可用于指示谁创建了结构元素或已对其进行了重大修改。此标记还可以包含电子邮件地址。如果提供了电子邮件地址,它必须遵循作者的姓名并包含在V形符号或尖括号中,并且必须遵守RFC5322第3.4.1节中定义的语法。

您可以使用PHPDoc的文档来回答所有要点。

几乎没有PHPDoc标签:

@abstract
@access
@author
@copyright
@deprecated
@deprec
@example
@exception
@global
@ignore
@internal
@license
@link
@name
@magic
@package
@param
@return
@see
@since
@static
@staticvar
@subpackage
@throws
@todo
@var
@version

您可以在https://en.wikipedia.org/wiki/PHPDoc

中找到更多信息