search
HomeBackend DevelopmentPHP Tutorial[Original] Use doxygen to manage project documents or comments, doxygen project_PHP tutorial

[Original] Use doxygen to manage project documents or comments, doxygen project

1. Doxygen application scenarios:

Doxygen can be used to manage comments in current mainstream programming languages ​​to form a documentation system. (Including C, C++, C#, Objective-C, IDL, Java, VHDL, PHP, Python, Tcl, Fortran, etc.). Doxygen official website address (http://www.doxygen.nl/) Recently, most of the time is spent on the maintenance of the API interface. One of the more important aspects is how the interface you write allows the caller to understand the usage at a glance. It is the same whether it is the cooperation between the internal wireless server and the client or the API interface open to the outside world. After spending a few days trying to use doxygen combined with svn hook to manage interface documents, it is very convenient and practical. The doxygen official website itself actually uses doxygen. If you want to see more specific effects, you can directly refer to http://www.doxygen.nl/.

Below I will post some of the renderings I made myself. The UI is very frustrating. When you actually use it, you can ask the company's UI department to beautify it. Since I mainly use it on the intranet, I haven't thought too much about the UI experience. :

2. Installation:

Doxygen currently fully supports mainstream systems such as windows, mac ox, and linux. And it is basically used in all current mainstream programming languages. Here is a brief introduction to the source code compilation and installation process under the ubuntu system. For other installation methods, please refer to the official website.

3. Configuration of the configuration file using doxygen:

The use of doxygen can be said to be the configuration of the configuration file. That is to say, you only need to slightly configure the configuration file and then execute the command: xxxx/doxygen xxxx.conf to generate the document you want (Here doxygen provides documents in a variety of formats. I mainly use html, so that we can configure a web service on this html ourselves, and then use the document on the web. ), doxygen provides it. With more than 200 configuration items, rich functions can be completed through configuration files. Here are some commonly used configuration instructions:

  • Use the command xxx/doxygen -g to generate a default configuration file doxygen.conf in the current directory. Open the default configuration file, and you will find that each configuration item in it is in the key-value format of configuration name and configuration value . If you have a certain knowledge of English, configuration is basically not a problem.
  • For detailed configuration instructions, please refer to: http://www.stack.nl/~dimitri/doxygen/manual/config.html
  • ABBREVIATE_BRIEF                                                                                                                                                                                                                         Aliases // Alias ​​
  • ALLEXTERNALS                                                                                                                                                             // All external documents
  • ALPHABETICAL_INDEX //Alphabetical index
  • ALWAYS_DETAILED_SEC        //Detailed description part
  • BINARY_TOC                                                                                                                                                                                                                                                 // Binary operations
  • BRIEF_MEMBER_DESC                                                                                     // Short member description CALL_GRAPH                                                                                                                                                                                                                                                                            
  • CASE_SENSE_NAMES //The names of the detected examples
  • CHM_FILE                                                                                                                                                                                                                                                         //CHM format file
  • CLASS_DIAGRAMS                                                                                           // Class-Table
  • CLASS_GRAPH       //Class-Graph
  • DOT_PATH        //DOT path settings
  • DOT_TRANSPARENT
  •      //DOT conversion settings
  • DOTFILE_DIRS
  •                                                                                                                                                                                                                                     //DOTFILE list display
  • ENABLE_PREPROCESSING
  •  ​                                                                                                                                                                                                          //Allow the "preprocessing" directive
  • ENUM_VALUES_PER_LINE
  • //The enumeration value of each line
  • ENABLED_SECTIONS
  •                                                                                                                                                                                                        Example_patterns // The file format ( *.cpp, *.h, *.java, etc.)
  • EXAMPLE_RECURSIVE     //Example recursion
  • COLLABORATION_GRAPH                                                                                                                                                                                 
  • COLS_IN_ALPHA_INDEX                                                                                                                                                                                                                                                   COMPACT_LATEX
  • //Compressed LATEX document
  • COMPACT_RTF
  • //Compressed RTF document
  • CREATE_SUBDIRS
  •                                             //Create a "subdirectory"
  • DETAILS_AT_TOP
  • //Detailed header of the document
  • DIRECTORY_GRAPH
  •                                                                                               
  • DISABLE_INDEX                                                                                                
  • DISTRIBUTE_GROUP_DOC                                                                                                                                                  EXCLUDE
  •                                                                                                                                                                                              
  • EXCLUDE_PATTERNS                   //Executable file format (*.exe, *.dll, etc.)
  • EXCLUDE_SYMLINKS     //Executable SYMLINKS
  • EXTERNAL_GROUPS     //External files used
  • EXTRA_PACKAGES                                                                                                                                                                                                                                               // External plug-in packages used
  • EXTRACT_ALL                                                                                     
  • EXTRACT_LOCAL_CLASSES //Extract all local classes
  • EXTRACT_LOCAL_METHODS //Extract all local methods
  • EXTRACT_PRIVATE                                                                                            EXTRACT_STATIC
  •                                                                                                                                // Extract all static
  • FILE_PATTERNS                                                                                                                                
  • FILTER_PATTERNS                             //Control format (main version: 1st version: 2nd version number)
  • FILTER_SOURCE_FILES //Version control of original files
  • FULL_PATH_NAMES //Full path name
  • GENERATE_AUTOGEN_DEF //Generate automatic definition file format
  • GENERATE_BUGLIST //Generate BUG list
  • GENERATE_CHI                                                                                                                                 GENERATE_DEPRECIATELIST
  • //Generate the "evaluation" list
  • GENERATE_HTML
  • //Generate HTML
  • GENERATE_HTMLHELP
  • //Generate HTMLHELP
  • GENERATE_LATEX
  • //Generate LATEX
  • GENERATE_LEGEND
  • //Generate legend
  • GENERATE_MAN
  •                                                           // Generate MAN file
  • GENERATE_PERLMOD
  • //Generate Perl script
  • GENERATE_RTF
  • //Generate RTF
  • GENERATE_TAGFILE                                                                                                                                                                                                        
  • GENERATE_TESTLIST //Generate TESTLIST
  • GENERATE_TODOLIST //Generate TODOLIST
  • GENERATE_TREEVIEW //Generate tree view display
  • GENERATE_XML //Generate XML
  • GRAPHICAL_HIERARCHY //Inherit chart
  • GROUP_GRAPHS                                                                                               HAVE_DOT
  •                                                                                                                  
  • HIDE_FRIEND_COMPOUNDS //Hide the "composite" friend type
  • HIDE_IN_BODY_DOCS //Hide the body of the document
  • HIDE_SCOPE_NAMES //Hide the "scope" name
  • HIDE_UNDOC_CLASSES //Hide all "unarchived" CLASS
  • HIDE_UNDOC_MEMBERS //Hide all "unarchived" members
  • HIDE_UNDOC_RELATIONS //Hide "unarchived" relationships
  • HTML_ALIGN_MEMBERS //Member alignment in HTML document
  • HTML_FOOTER //HTML footnote settings
  • HTML_HEADER //HTML header settings
  • HTML_OUTPUT                                                                                                                                                                                                                    
  • HTML_STYLESHEET //HTML style setting
  • IGNORE_PREFIX                                                                                                                                                                                 Image_path // The path of the picture set
  • INCLUDE_GRAPH                                                                                            ​
  • INCLUDE_PATH                                                                                                                                                                                                                                                              
  • INHERIT_DOCS
  • //Inheritance relationship of documents
  • INLINE_INHERITED_MEMB
  • //Inline members obtained through "inheritance"
  • INLINE_SOURCES
  • //Source code of the inline part
  • INPUT
  •                                                                                                      ​  INPUT_FILTER                                                                                                                                                                                           // Acceptable input file extension format settings (important)
  • INTERNAL_DOCS //Internal Documents
  • JAVADOC_AUTOBRIEF                                                                          // "Automatic summary" of the document generated by the JAVADOC tool
  • LATEX_BATCHMODE //LATEX matching mode
  • LATEX_CMD_NAME                                                                              // LATEX command name
  • LATEX_HEADER                                                                                                 LATEX_HIDE_INDICES
  •                                                                                                                                                                                                        
  • LATEX_OUTPUT                                                                                               
  • MACRO_EXPANSION //Macro expansion settings (important)
  • MAKEINDEX_CMD_NAME //MAKEINDEX command index
  • MAN_LINKS                                                                                                                                                                                                                                                                                MAN_OUTPUT
  •                                                                                                                                                                                                                                                   
  • MAX_DOT_GRAPH_DEPTH //Maximum depth of DOT map
  • MAX_DOT_GRAPH_HEIGHT //Maximum height of DOT graph
  • MAX_DOT_GRAPH_WIDTH //Maximum width of DOT graph
  • MAX_INITIALIZER_LINES //Maximum initialization lines
  • MULTILINE_CPP_IS_BRIEF //Short description of multiple CPP files
  • MULTILINE_CPP_IS_BRIEF //Short description of multiple CPP files
  • OPTIMIZE_OUTPUT_FOR_C //Optimization settings for C
  • OPTIMIZE_OUTPUT_JAVA //Optimization settings for JAVA
  • OUTPUT_DIRECTORY //Output path setting (important)
  • OUTPUT_LANGUAGE //Output language setting (important)
  • PAPER_TYPE                                                                                                                                                                                                                                    
  • PDF_HYPERLINKS //PDF format hyperlink settings (important)
  • PERL_PATH                                                                                                                                                                                                                             PERLMOD_LATEX
  •                            //perlmod LATEX
  • PERLMOD_MAKEVAR_PREFIX
  • //perlmod MAKE file version PREFIX
  • PREDEFINED
  •                                                                                                                                                                                                                                                                               
  • PROJECT_NAME                                                                                                                                                                                                                                            
  • PROJECT_NUMBER //Project members (important)
  • QUIET                                                                                                                                                                                                                                                                               .
  • RECURSIVE                                                                                                                                                             
  • REFERENCED_BY_RELATION //Cross reference (important)
  • Repeat_brief
  • // Set up "Short Explanation" to open the state
  • RTF_HYPERLINKS
  •                                                                                               RTF_OUTPUT                                                                                                                               
  • SEARCH_INCLUDES                                                                                                                                                                    // What needs to be included in the search (important)
  • SEARCHENGINE                                                                         //Search engine settings (important)
  • SHORT_NAMES                                                                                                                                                                                                                                                         
  • SHOW_DIRECTORIES
  • //Show directory
  • SHOW_INCLUDE_FILES
  •                                                                                                                                               // Show included files (usually NO, otherwise too large) Show_used_files
  • // Show the file (general yes)
  • SKIP_FUNCTION_MACROS
  •                         // Skip the macros in the function (important), novices should not skip it
  • SORT_MEMBER_DOCS
  •                                                                                                                                                                                                                                     
  • SOURCE_BROWSER                                                                                                                                                                                                                       
  • STRIP_CODE_COMMENTS //Exclude which barcode form comments (important)
  • STRIP_FROM_INC_PATH                                 // Exclude which header files contain comments (important)
  • STRIP_FROM_PATH //Exclude which barcode path settings
  • SUBGROUPING                                                                                                                                                                                                                                     // Subgroup settings (important)
  • TAB_SIZE                                                                                                                                                                                                                TAGFILES
  •                                                                                                                                                                                     
  • TEMPLATE_RELATIONS //Template relationship settings (important)
  • TOC_EXPAND                                                                                                             
  • TREEVIEW_WIDTH                                                                                                                                                         UML_LOOK
  •                                                                                                                                         
  • USE_WINDOWS_ENCODING //Use the encoding form of the windows system (important)
  • VERBATIM_HEADERS //VERBATIM headers (header files)
  • WARN_FORMAT                                                                                                                                                                                                           // Warning format specification (important)
  • WARN_IF_DOC_EC_ERROR // If the document is wrong, a warning
  • WARN_IF_UNDOCUMENTED //If it is an unarchived file, display a warning
  • WARN_LOGFILE                                                                                                                                                                                                                       // Warning log file settings
  • WARN_NO_PARAMDOC                                                                                                                                                  // No parameter document warning format setting
  • WARNINGS                                                                                                                                                                                                                                                                               ​
  • XML_DTD
  •                                                                                                                                                                                                                                      XML_OUTPUT                                                                                                                                                                                                                            
  • XML_PROGRAMLISTING                                                         //XML program list (important)
  • XML_SCHEMA                                                                                                                                                                                                                                           4. Writing comments after doxygen configuration is completed
  • After you configure doxygen, you will basically spend your time writing and maintaining comments in your code. I want to use doxygen to manage documents. Then code comments do not need to be strictly required.

    After writing comments according to the specifications, the effect displayed in the page document is as follows:

/**
 * @brief 这里用brief来说明接口方法的主要功能
 * @date   接口方法的创建时间
 * @author 接口方法的创建人
 * @param  : 参数说明如下表:
 * name     | type     |description of param 
 * ----------|-----------|--------------------
 * car_id   | int      |车源编号
 * province | int      |业务员所在省份
 * x        |  x       |   x
 * x        |  x       |   x
 * x        |  x       |   x
 * @return    返回值说明如下:
 * name     | type     | description of value
 * -------- |----------|----------------------
 * car_id   | int      | 车源编号
 * car_info | object   | json对象格式的车源信息
 * @warning   该接口需要告知给调用者看的一些警告
 * @attention 该接口需要告知给调用者看的一些注意事项
 * @note      该接口的一些备注说明。通常用于当后者对该接口有较大改动的时候。备注一下某个时间点某人改动了什么东西
 * @ todo     该接口的一些未完成的待办内容
 */
public function newSale() {
    do someting;
 }
    The writing rules can be agreed in advance within the project, and the rest only needs to be maintained according to these rules. Of course, people are human after all, and it is impossible to guarantee that all code can be written according to the expected annotation rules. Therefore, the path to the log file can be specified in the doxygen configuration file. You can make good use of this log file, write a small piece of code in the corresponding script language to analyze the log file, and then display it on the web page in a humane way. Designated managers regularly check the annotation error log and correct incorrect annotation content immediately.
  • 5. Commonly used features of doxygen

The functions of doxygen are far more than what I introduced above, and there are many rich and colorful functions. If you want to use this thing, you can go to the doxygen official website to learn about it yourself. This article may be reproduced at will, but please be sure to indicate the source of the original text.

http://www.bkjia.com/PHPjc/922301.html

www.bkjia.comtrue

http: //www.bkjia.com/PHPjc/922301.htmlTechArticle

[Original] Use doxygen to manage project documents or comments, doxygen project 1, doxygen application scenarios: doxygen can be used Manage the comments of current mainstream programming languages ​​to form a documentation system...
Statement
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
PHP Email: Step-by-Step Sending GuidePHP Email: Step-by-Step Sending GuideMay 09, 2025 am 12:14 AM

PHPisusedforsendingemailsduetoitsintegrationwithservermailservicesandexternalSMTPproviders,automatingnotificationsandmarketingcampaigns.1)SetupyourPHPenvironmentwithawebserverandPHP,ensuringthemailfunctionisenabled.2)UseabasicscriptwithPHP'smailfunct

How to Send Email via PHP: Examples & CodeHow to Send Email via PHP: Examples & CodeMay 09, 2025 am 12:13 AM

The best way to send emails is to use the PHPMailer library. 1) Using the mail() function is simple but unreliable, which may cause emails to enter spam or cannot be delivered. 2) PHPMailer provides better control and reliability, and supports HTML mail, attachments and SMTP authentication. 3) Make sure SMTP settings are configured correctly and encryption (such as STARTTLS or SSL/TLS) is used to enhance security. 4) For large amounts of emails, consider using a mail queue system to optimize performance.

Advanced PHP Email: Custom Headers & FeaturesAdvanced PHP Email: Custom Headers & FeaturesMay 09, 2025 am 12:13 AM

CustomheadersandadvancedfeaturesinPHPemailenhancefunctionalityandreliability.1)Customheadersaddmetadatafortrackingandcategorization.2)HTMLemailsallowformattingandinteractivity.3)AttachmentscanbesentusinglibrarieslikePHPMailer.4)SMTPauthenticationimpr

Guide to Sending Emails with PHP & SMTPGuide to Sending Emails with PHP & SMTPMay 09, 2025 am 12:06 AM

Sending mail using PHP and SMTP can be achieved through the PHPMailer library. 1) Install and configure PHPMailer, 2) Set SMTP server details, 3) Define the email content, 4) Send emails and handle errors. Use this method to ensure the reliability and security of emails.

What is the best way to send an email using PHP?What is the best way to send an email using PHP?May 08, 2025 am 12:21 AM

ThebestapproachforsendingemailsinPHPisusingthePHPMailerlibraryduetoitsreliability,featurerichness,andeaseofuse.PHPMailersupportsSMTP,providesdetailederrorhandling,allowssendingHTMLandplaintextemails,supportsattachments,andenhancessecurity.Foroptimalu

Best Practices for Dependency Injection in PHPBest Practices for Dependency Injection in PHPMay 08, 2025 am 12:21 AM

The reason for using Dependency Injection (DI) is that it promotes loose coupling, testability, and maintainability of the code. 1) Use constructor to inject dependencies, 2) Avoid using service locators, 3) Use dependency injection containers to manage dependencies, 4) Improve testability through injecting dependencies, 5) Avoid over-injection dependencies, 6) Consider the impact of DI on performance.

PHP performance tuning tips and tricksPHP performance tuning tips and tricksMay 08, 2025 am 12:20 AM

PHPperformancetuningiscrucialbecauseitenhancesspeedandefficiency,whicharevitalforwebapplications.1)CachingwithAPCureducesdatabaseloadandimprovesresponsetimes.2)Optimizingdatabasequeriesbyselectingnecessarycolumnsandusingindexingspeedsupdataretrieval.

PHP Email Security: Best Practices for Sending EmailsPHP Email Security: Best Practices for Sending EmailsMay 08, 2025 am 12:16 AM

ThebestpracticesforsendingemailssecurelyinPHPinclude:1)UsingsecureconfigurationswithSMTPandSTARTTLSencryption,2)Validatingandsanitizinginputstopreventinjectionattacks,3)EncryptingsensitivedatawithinemailsusingOpenSSL,4)Properlyhandlingemailheaderstoa

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool