php apigen,APIGen:一个智能和可读的API文档生成器

本文档介绍了如何为PHP项目安装和使用ApiGen工具,以生成清晰易读的API文档。首先,你可以通过Composer在本地或全局安装ApiGen。然后,运行简单的命令来生成源代码和目标目录之间的文档。配置文件可以简化命令行选项,提供更灵活的设置。此外,还提供了测试、支持获取和贡献指南。
摘要由CSDN通过智能技术生成

Smart and Readable Documentation for your PHP project

68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f41706947656e2f41706947656e2f6d61737465722e7376673f7374796c653d666c61742d73717561726568747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f41706947656e2f41706947656e2e7376673f7374796c653d666c61742d73717561726568747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f41706947656e2f41706947656e2e7376673f7374796c653d666c61742d73717561726568747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61706967656e2f61706967656e2e7376673f7374796c653d666c61742d73717561726568747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61706967656e2f61706967656e2e7376673f7374796c653d666c61742d737175617265

Requirements

PHP 5.5

Install

1. Using Composer (preferred method)

In your project's root folder:

composer require --dev apigen/apigen

Or if you want it globally:

composer global require --dev apigen/apigen

2. As a PHAR

In your project's root folder:

curl -L -O https://github.com/ApiGen/ApiGen.github.io/raw/master/apigen.phar

(or just download it here).

For global installation, just move the downloaded apigen.phar to your path.

Usage

NOTE: The above examples assume you have ApiGen installed in your path. You might need to change the apigen command to vendor/bin/apigen if installed locally through Composer or php apigen.phar if using the PHAR version.

Run ApiGen with source and destination options:

apigen generate -s ./src -d ./docs

To omit cli options just create apigen.yaml or apigen.neon file in your project's root folder:

source:

- ./src

destination: ./docs

For all available options, along with descriptions and default values, just run:

apigen generate --help

NOTE: In config files, options are camelCased (i.e. accessLevel for --access-level).

Refer to the wiki for all supported annotations.

Testing

$ phpunit

Get Support!

#apigen on irc.freenode.net - Come chat with us, we have cake.

GitHub Issues - Got issues? Please tell us!

Roadmaps - Want to contribute? Get involved!

Contributing

Please refer to CONTRIBUTING for details.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
>