ApiGen4.1 Windows installation tutorial, apigen4.1 tutorial _php Tutorial

Source: Internet
Author: User
Tags deprecated php source code

ApiGen4.1 Windows installation tutorial, apigen4.1 Tutorial


I. ApiGen4.1 version Introduction

1.ApiGen Introduction

Apigen is a reading document tool that automatically generates PHP projects. Used to create professional API documents from PHP source code, similar to Phpdocumentor/phpdoc.

ApiGen4.1 requires version support for PHP 5.4+

2.ApiGen website Address

(1). Oschina Address Www.oschina.net/p/apigen

(2). Official Address www.apigen.org

(3). GitHub Address Https://github.com/apigen/apigen#options

3. Notable cases:

4.ApiGen Style Style

The official recommendation has the default and Twitter bootstrap two sets of style styles.

    • Apigen official Default Style
    • Apigen Official Bootstrap style

Two. Apigen Windows installation Steps

1. Download Apigen.

Official Address http://www.apigen.org/

Official website Download Address Http://apigen.org/apigen.phar

2. Writing the Windows executable bat file

Open Notepad to write the following related information and save as a Apigen.bat file.

" %~dp0apigen.phar " %*

For example

" %~dp0apigen.phar " %*

Save As Apigen.bat

3. Copy or move the Apigen.phar and Apigen.bat files to any directory in the environment variable path.

Windows7 corresponding Directory is C:\Windows\System32

4. Execution of the Apigen version and related command information on the command line proves that the installation was successful.

C:\>4.1. 0  --help (-h)    --quiet (-q)   --version (-V) Display this application version. Available commands:generate      Generate API documentation          Help for  a command list          Lists commandsSelf-update   updates Apigen.phar to the latest available version selfupdate    Updates Apigen.phar to the latest available version

5. Execute the Generate Apigen document command.

" PHP Project Address " " Document Export Address "

Complete example

" D:\web\ruionline " " D:\web\ruionline\doc "

Export Build Process

Web Presentation effects

Three. Apigen Command Parameters detailed description

--source
 
  Project directory that needs to be compiled into a document,--source
  
   You can also specify multiple--destination
   
    directory paths that are stored after compilation--title
    
     title of the first page of the document--exclude
     
      Excluded directories, such as
      '
      views/*
      '
      represents a non-generated document under the View directory) Options:--source (-s) Dirs or files documentation is generated
       for
      . (Multiple values allowed)--destination (-D) Target
      dir 
       for
      documentation.--access-
      levels Access levels of included method and properties. (Default: [
      "
       Public
      ",
      "
      protected
      "
      ]) (Multiple values allowed)--annotation-
      groups
      Generate page with elements with specific annotation.--base-url Base URL Used
       forSitemap (Useful
       for
      Public doc). --config Custom path to Apigen.neon config
      file. (Default:
      "
      E:\\ide/apigen.neon
      "
      )--google-cse-
      IDCustom Google search engine
      ID(
       for
      search box). --google-
      Analytics Google Analytics tracking code.--
      Debug Turn on debug mode.--deprecated Generate Documentation
       for
      elements marked as @deprecated--
      download Add link to ZIP archive of documentation.--extensions scanned
      fileExtensions. (Default: [
      "
      PHP
      "
      ]) (Multiple values allowed)--
      exclude directories and files matching this mask would not be parsed (e.g.*/tests
      /*
      ). (Multiple values allowed)--groups The elements is grouped in menu. (Default: "Auto")--charset charset of scanned files. (Multiple values allowed)--main Elements with the This name prefix would be the first in tree. --internal Include elements marked as @internal. --php Generate documentation for PHP internal classes. --skip-doc-path Files Matching this mask would be included on class tree, but would not create a link to their documentation . (Multiple values allowed)--no-source-code do not generate highlighted source code for elements. --template-theme Apigen Template theme name. (Default: "Default")--template-config Your own template config, with higher priority templatetheme. --title title of generated documentation. --todo Generate documentation for elements marked as @todo. --tree Generate tree view of classes, interfaces, traits and exceptions. --help (-h) Display this help message. --quiet (-Q) Do not output any message. --version (-V) Display this application version.
     
    
   
  
 

Four. Apigen Support PHP Comment explanation

Support the official PSR-5 standard

1.Custom

@deprecatedpackagesubpackagecopyrightlicenseauthorversionsinceseeusesinternaltodoStandard

2.param

return throws{@inheritdoc}magic methods and properties

3.property

property-readproperty-Writemethod

http://www.bkjia.com/PHPjc/1059467.html www.bkjia.com true http://www.bkjia.com/PHPjc/1059467.html techarticle ApiGen4.1 Windows installation Tutorial, apigen4.1 Tutorial one. ApiGen4.1 Version Introduction 1.ApiGen introduction Apigen is a reading document tool that automatically generates PHP projects. Used to create a professional from PHP source code ...

  • Related Article

    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.