PHPackages                             apex/docs-generator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. apex/docs-generator

ActivePackage[Utility &amp; Helpers](/categories/utility)

apex/docs-generator
===================

Automatically generate docs for all classes and methods

2.0.6(2y ago)11691MITPHPPHP &gt;=8.1

Since Jul 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/apexpl/docs-generator)[ Packagist](https://packagist.org/packages/apex/docs-generator)[ Docs](https://apexpl.io)[ RSS](/packages/apex-docs-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (8)Used By (1)

Apex Docs Generator
===================

[](#apex-docs-generator)

Automatically generates static developer documentation for either, a single PHP class or all classes within a project directory. Theme based allowing results to be easily styled any way you wish, and comes with support for basic HTML, markdown and Syrus formats.

Some example of generated documentation:

Class:

Method:

Installation
------------

[](#installation)

Install via Composer with:

> `composer require apex/docs-generator`

Table of Contents
-----------------

[](#table-of-contents)

You will only ever need two methods within the the `Apex\Docs\DocsGenerator` class:

- [generateClass()](https://github.com/apexpl/docs-generator/blob/master/docs/generateclass.md)
- [generateDirectory()](https://github.com/apexpl/docs-generator/blob/master/docs/generatedirectory.md)

Usage
-----

[](#usage)

**Generate Docs for Single Class**

```
use Apex\Docs\docsGenerator;

/ Set some variables
$class_name = "App\\MyPackage\\Controllers\\OrderController";
$dest_dir = "/path/to/docs/order_controller";
$base_uri = "/docs/";

// Generate single class
$generator = new DocsGenerator();
$generator->generateClass($class_name, $dest_dir, $base_uri, 'html');
```

The last parameter in the `generateClass()` function is the theme to use. All themes can be found within /themes/ of the installation directory, and by default supports three themes - *html, markdown, syrus*

The above will create a blank directory at /path/to/docs/order\_controller, an index.html file inside that lists all methods within the class, each of which link to another method specific page.

\*\* Generate Documentation for Directory of PHP Classes\*\*

```
use Apex\Docs\docsGenerator;

/ Set some variables
$source_dir = "/path/to/my_package";
$dest_dir = "/path/to/docs/";
$base_uri = "/docs/";
$base_namespace = "App\\MyPackage\\";

// Generate directory
$generator = new DocsGenerator();
$generator->generateDirectory($source_dir, $dest_dir, $base_uri, $base_namespace, 'html');
```

This will go through all files and directories within `$source_dir`, and generate a new documentation directory for every PHP class found. I will also generate the necessary index pages within each root nameaspace that contains PHP casses, giving an overview of all classes within that namespace.

Syrus Integration
-----------------

[](#syrus-integration)

There is build-in support for [Syrus](https://github.com/apexpl/syrus/) if you so desire. If you wish to use this integration and are using Syrus outside of Apex, to enable the integration open the /config/container.php Syrus file and look for the item:

> `syrus.tag_namespaces`

Within this array, add the entry:

> `Apex\\Docs\\SyrusTags`

That's it. When generating documentation simply change the `$theme` paramter from "html" to "syrus", and it wll generate the documenation formatted for Syrus.

Apex
----

[](#apex)

Brought to you by Apex Framework at .

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~31 days

Recently: every ~46 days

Total

7

Last Release

844d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4fe486d2ed7db571c0519bb0d52b08b5e953a911936e87331e736a381ef96f29?d=identicon)[apex](/maintainers/apex)

---

Top Contributors

[![apexpl](https://avatars.githubusercontent.com/u/56146521?v=4)](https://github.com/apexpl "apexpl (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/apex-docs-generator/health.svg)

```
[![Health](https://phpackages.com/badges/apex-docs-generator/health.svg)](https://phpackages.com/packages/apex-docs-generator)
```

###  Alternatives

[delight-im/base64

Simple and convenient Base64 encoding and decoding for PHP

15158.1k6](/packages/delight-im-base64)

PHPackages © 2026

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