api-doc-php
This commit is contained in:
parent
5968803f06
commit
0416c239b8
42
README.md
42
README.md
|
@ -1 +1,43 @@
|
|||
# api-doc-php
|
||||
|
||||
### 开源地址:
|
||||
|
||||
[GigHub https://github.com/itxq/api-doc-php](https://github.com/itxq/api-doc-php)
|
||||
|
||||
[码云 https://gitee.com/itxq/api-doc-php](https://github.com/itxq/api-doc-php)
|
||||
|
||||
|
||||
|
||||
### 主要功能:
|
||||
|
||||
+ 根据接口注释自动生成接口文档
|
||||
|
||||
### 扩展安装:
|
||||
|
||||
+ composer命令 `composer require itxq/wechat-sdk-php`
|
||||
|
||||
### 引用扩展:
|
||||
|
||||
+ 当你的项目不支持composer自动加载时,可以使用以下方式来引用该扩展包
|
||||
|
||||
`require_once __DIR__ . '/vendor/autoload.php'`
|
||||
|
||||
### 使用扩展:
|
||||
|
||||
```
|
||||
// 引入SDK
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
// 配置信息
|
||||
$config = [
|
||||
'class' => ['Api', 'Api2'], // 要生成文档的类
|
||||
'filter_method' => ['__construct', 'add', 'edit'], // 要过滤的方法名称
|
||||
];
|
||||
|
||||
// 调用
|
||||
$api = new \itxq\apidoc\ApiDoc($config);
|
||||
$doc = $api->getApiDoc();
|
||||
echo '<pre>';
|
||||
var_dump($doc);
|
||||
echo '</pre>';
|
||||
```
|
|
@ -9,7 +9,6 @@
|
|||
"email": "360237521@qq.com"
|
||||
}
|
||||
],
|
||||
"version" : "1.0.*",
|
||||
"require" : {
|
||||
"php": ">=5.6.0"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user