diff --git a/README.md b/README.md index 31e8189..b822e0d 100644 --- a/README.md +++ b/README.md @@ -1 +1,43 @@ -# api-doc-php \ No newline at end of file +# 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 '
'; +var_dump($doc); +echo ''; +``` \ No newline at end of file diff --git a/composer.json b/composer.json index d82a88b..b9fcb3a 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,6 @@ "email": "360237521@qq.com" } ], - "version" : "1.0.*", "require" : { "php": ">=5.6.0" },