PHPackages                             oscoder/doc-php-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. oscoder/doc-php-api

ActiveLibrary

oscoder/doc-php-api
===================

doc\_php\_api

05HTML

Since Apr 26Pushed 6y ago1 watchersCompare

[ Source](https://github.com/oscoder/doc-php-api)[ Packagist](https://packagist.org/packages/oscoder/doc-php-api)[ RSS](/packages/oscoder-doc-php-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

### 扩展安装：

[](#扩展安装)

- 方法一：composer命令 `composer require oscoder/doc_php_api`
- 方法二：直接下载压缩包，然后进入项目中执行 composer命令 `composer update` 来生成自动加载文件

### 引用扩展：

[](#引用扩展)

- 当你的项目不支持composer自动加载时，可以使用以下方式来引用该扩展包

```
// 引入扩展（具体路径请根据你的目录结构自行修改）
require_once __DIR__ . '/vendor/autoload.php';

```

### 使用扩展：

[](#使用扩展)

```
// 引入扩展（具体路径请根据你的目录结构自行修改）
require_once __DIR__ . '/../vendor/autoload.php';
// 加载测试API类1
require_once __DIR__ . '/Api.php';
// 加载测试API类2
require_once __DIR__ . '/Api2.php';
$config = [
    'class'         => ['Api', 'Api2'], // 要生成文档的类
    'filter_method' => ['__construct'], // 要过滤的方法名称
];
$api = new \oscoder\doc_php_api\BootstrapApiDoc($config);
$doc = $api->getHtml();
exit($doc);

```

### 具体效果可运行test目录下的`index.php`查看

[](#具体效果可运行test目录下的indexphp查看)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/fbc84b5aad08eee657c9a70ad60467c7805f60c66da0e61ac8f2969851185d63?d=identicon)[oscoder](/maintainers/oscoder)

---

Top Contributors

[![oscoder](https://avatars.githubusercontent.com/u/1112385?v=4)](https://github.com/oscoder "oscoder (6 commits)")

### Embed Badge

![Health badge](/badges/oscoder-doc-php-api/health.svg)

```
[![Health](https://phpackages.com/badges/oscoder-doc-php-api/health.svg)](https://phpackages.com/packages/oscoder-doc-php-api)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
