Contents
phpDocumentor tags are very similar to tags for the JavaDoc tool for Sun’s Java Programming Language. Tags are only parsed if they are the first thing on a new line of a DocBlock. You may use the @ character freely throughout documents as long as it does not begin a new line.
What can you do with a DocBlock in PHP?
Using a DocBlock you are able to effectively document your application’s API (Application Programming Interface) by describing the function of, and relations between, elements in your source code, such as classes and methods.
What are the three parts of a PHPDoc?
Commonly a piece of PHPDoc consists of the following three parts in order of appearance: A short piece of text, usually one line, providing the basic function of the associated element. An optional longer piece of text providing more details on the associated element’s function. This is very useful when working with a complex element.
What does a doccomment in PHP stand for?
A DocComment is the container that contains documentation that can be formatted according to the PHPDoc Standard. A DocBlock is always associated with one, and just one, Structural Element in PHP; so this may either be a file, class, interface, trait, function, constant, method, property or variable.
When to use @ package and phpDocumentor?
@package can only be used to document procedural pages or classes. Packages are used to help you logically group related elements. You write classes to group related functions and data together, and phpDocumentor represents the contents of files (functions, defines, and includes) as “Procedural Pages.”
How is a phpDocumentor used in procedural pages?
Packages are used to help you logically group related elements. You write classes to group related functions and data together, and phpDocumentor represents the contents of files (functions, defines, and includes) as “Procedural Pages.”
When to check the output of phpDocumentor?
When in doubt, check the output of phpDocumentor, it mentions the project’s root folder after all files are collected. By default phpDocumentor will ignore hidden files and will not follow symlinks. This will prevent unwanted documentables and loops in paths.