api-doc-php

This commit is contained in:
IT小强xqitw.cn 2018-06-06 11:09:43 +08:00
parent 5968803f06
commit 0416c239b8
2 changed files with 43 additions and 2 deletions

View File

@ -1 +1,43 @@
# api-doc-php # 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>';
```

View File

@ -9,7 +9,6 @@
"email": "360237521@qq.com" "email": "360237521@qq.com"
} }
], ],
"version" : "1.0.*",
"require" : { "require" : {
"php": ">=5.6.0" "php": ">=5.6.0"
}, },