PHP annotation Standard

Source: Internet
Author: User

/**
* @name name
* @abstract DECLARE variable/class/method
* @access Specify the access rights of this variable, class, Function/method *
@author the name and email address of the author of the function
* Category Organization Packages
* @copyright Specify Copyright Information
* @const Specify Constants
* @deprecate indicate information that is not recommended or discarded
* @example Example
* Exclude indicates that the current annotation will not be parsed and does not appear in the text block
* @final indicate that this is a final class, method, property, and prohibit derivation, modification.
* @global indicate the global variable * referenced in this function *
@include indicate the information for the contained file *
@link define the online connection
* @module module information for the definition of attribution
* Modulegroup The module group that defines attribution * @package the information of the
package that defines the attribution *
@param define the parameter information of a function or method *
@return Define the return information of a function or method
* @see Define the functions and variables that need to be referenced, and add the corresponding super connections.
* @since indicate which version of the API function or method was introduced from
@static indicates that the variable, class, function is static.
* @throws indicate an error exception that may be thrown by this function, which is extremely occurring
* @todo indicate where it should be improved or not implemented
* @var define a description variable/attribute.
* @version Define version information * *

The use of a document tag is a keyword, or other document tag, that the tag can be used to decorate.
All document tags are preceded by @ at the end of each line. If the mark in the middle of a passage comes out @, the mark will be ignored as plain content.
@access
Scope of Use: Class,function,var,define,module
This tag is used to indicate access rights for keywords: private, public, or proteced
@author
Specify the author
@copyright
Scope of Use: Class,function,var,define,module,use
Specify copyright information
@deprecated
Scope of Use: Class,function,var,define,module,constent,global,include
Indicate unused or obsolete keywords
@example
The tag is used to parse a piece of file content and highlight them. Phpdoc will attempt to read the contents of the file from the file path that is marked
@const
Scope of Use: Define
Constants used to indicate define in PHP
@final
Scope of Use: Class,function,var
Indicates that the keyword is a final class, method, property, and prohibits derivation and modification.
@filesource
Similar to example, except that the tag will directly read the contents of the currently parsed PHP file and display it.
@global
Indicates the global variables referenced in this function
@ingore
Used to ignore the specified keyword in the document
@license
The equivalent of HTML tags, first is the URL, and then the content to be displayed
For example [url=http://bbs.phpchina.com/"http://www.jigwang.com"]php those things [/url]
You can write @license http://www.jigwang.com php stuff.
@link
Similar to license
But you can also refer to any one of the keywords in the document by link.
@name
Specifies an alias for the keyword.
@package
Scope of Use: page-level-> define,function,include
Class-Level->class,var,methods
Used to logically divide one or several keywords into a group.
@abstrcut
Indicates that the current class is an abstract class
@param
Indicates the parameters of a function
@return
Indicates the return point of a method or function
@static
Indicates that the closed word is static.
@var
Indicate variable type
@version
Indicate version information
@todo
Identify areas that should be improved or not implemented
@throws
Indicates an error exception that may be thrown by this function, which is most likely to occur
As mentioned above, ordinary document tag tags must be at the beginning of each line at the @ mark, in addition, there is a tag called inline tag, expressed in {@}, specifically include the following:
{@link}
Use the same @link
{@source}
Display the contents of a function or method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.