How to annotate class specifications in php

怪我咯
Release: 2023-03-10 15:36:02
Original
1805 people have browsed it

@access
Usage scope: class, function, var, define, module
This tag is used to indicate the access permission of the keyword: private, public or protected
@author
Specify the author
@copyright
Scope of use: class, function, var, define, module, use
Indicate copyright information
@deprecated
Scope of use: class, function, var, define, module, constent , global, include
Indicate unused or obsolete keywords
@example
This tag is used to parse a section of file content and highlight them. Phpdoc will try to read the file content from the file path given by this tag@const
Usage scope: define
Used to specify the constant of define in php
@final
Usage scope: class, function, var
Indicates that the keyword is a final class, method, attribute, and prohibits derivation and modification.
@filesource
Similar to example, except that this tag will directly read the content of the currently parsed php file and display it.
@global
Indicate the global variable referenced in this function
@ingore
Used to ignore the specified keyword in the document
@license
Equivalent to the
html tag The in is the URL first, followed by the content to be displayed For example, Baidu
Can be written as @license http://www.baidu.com Baidu
@link
Similar to license
but you can also point to any keyword in the document through link
@name
Specify an alias for the keyword.
@package
Usage scope: page level -> define, function, include
Class level ->class, var, methods
Used to logically combine one or several keywords Assigned to a group.
@abstrcut
Indicates that the current class is an
abstract class @param
Specifies the parameters of a
function @return
Specifies a The return pointer of a method or function
@
static indicates that the keyword is static.
@var
Indicate the variable type
@version
Indicate the version information
@todo
Indicate the areas that should be improved or not implemented
@throws
Indicate that this function may Error exceptions thrown, extreme situations
As mentioned above, ordinary document tags must be marked with @ at the beginning of each line. In addition, there is also a tag called inline tag, using {@} Representation, including the following:
{@link}
Usage is the same as @link
{@source}
Display the content of a function or method

The above is the detailed content of How to annotate class specifications in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template