Annotation specification, code Annotation specification _ PHP Tutorial

Source: Internet
Author: User
Annotation specification and code Annotation specification. Annotation specification, code Annotation specification @ access scope of use: class, function, var, define, module this tag is used to specify the access permission for Keywords: private, public, or proteced @ author indicates the Annotation specification, and the code Annotation specification
@ Access
Usage scope: class, function, var, define, module
Indicates the access permission for a keyword: private, public, or proteced.
@ Author
Specify author
@ Copyright
Usage scope: class, function, var, define, module, use
Copyright information
@ Deprecated
Usage scope: class, function, var, define, module, constent, global, include
Specify unnecessary or obsolete keywords
@ Example
This tag is used to parse the content of a file and highlight it. Phpdoc will try to read the file content from the file path marked
@ Const
Scope of use: define
Used to specify the define constant in php
@ Final
Usage scope: class, function, var
Specifies that a keyword is a final class, method, or attribute, and cannot be derived or modified.
@ Filesource
Similar to example, however, this tag will directly read and display the content of the currently resolved php file.
@ Global
Specifies the global variables referenced in this function.
@ Ingore
Used to ignore specified keywords in the document
@ License
It is equivalent to the URL in the html tag, followed by the content to be displayed.
Such as http://www.baidu.com "> Baidu
Can Write @ license http://www.baidu.com Baidu
@ Link
Similar to license
However, you can refer to any keyword in the document through link.
@ Name
Specify an alias for the keyword.
@ Package
Scope of use: page-> define, function, include
Class-> class, var, methods
It is used to logically group one or more keywords into one group.
@ Shortcut
Indicates that the current class is an abstract class.
@ Param
Specify the parameters of a function.
@ Return
Specifies the return value of a method or function.
@ Static
Indicates that the word is static.
@ Var
Variable type
@ Version
Specify version information
@ Todo
Specify the areas to be improved or not implemented
@ Throws
Indicates the error exception that this function may throw.
As mentioned above, the mark of common documents must start with @ at the beginning of each line. In addition, there is also a mark called inline tag, which is represented by {@}, including the following:
{@ Link}
Usage: @ link
{@ Source}
Display the content of a function or method

Usage @ access scope: class, function, var, define, module this tag is used to specify the access permission for the keyword: private, public, or proteced @ author specified...

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.