ApiGen4.1 Windows installation Tutorial

Source: Internet
Author: User
Tags deprecated php source code

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:
    1. Amazaon Web Services
    2. Doctrine
    3. Nette
    4. Cakephp
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 Step 1. Download Apigen.

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

Official website 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

Final build directory structure

Web Presentation effects

Three. Apigen Command Parameters detailed description
--source <path> The Project directory that needs to be compiled into a document,--source <path>You can also specify multiple--destination <path>directory paths that are stored after compilation--title <Name>title of the first page of the document--exclude <path> 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) Targetdir  fordocumentation.--access-levels Access levels of included method and properties. (Default: [" Public","protected"]) (Multiple values allowed)--annotation-groupsGenerate page with elements with specific annotation.--base-url Base URL Used forSitemap (Useful forPublic doc). --config Custom path to Apigen.neon configfile. (Default:"E:\\ide/apigen.neon")--google-cse-IDCustom Google search engineID( forsearch box). --google-Analytics Google Analytics tracking code.--Debug Turn on debug mode.--deprecated Generate Documentation forelements marked as @deprecated--download Add link to ZIP archive of documentation.--extensions scannedfileExtensions. (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 document ation. (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

ApiGen4.1 Windows installation Tutorial

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.