Skip to main content
PHP

PHPDocumentor

By July 21, 2019January 14th, 2020No Comments

Download the PHAR from their website. This is the easiest method to start with and works perfectly.


1
php ~/phpDocumentor.phar -d . -t docs

I found an excellent configuration file that you just need to place and it will make life easier.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0" encoding="UTF-8" ?>
<phpdoc>
    <title>App Plugins Documentations</title>
    <parser>
        <target>reference/docs</target>
    </parser>
    <transformer>
        <target>reference/docs</target>
    </transformer>
    <files>
        <directory>.</directory> <!-- Scan and parse all the php files except those found in the paths below -->
        <ignore>assets/*</ignore>
        <ignore>includes/gm-virtual-pages/*</ignore>
        <ignore>includes/app_virtual_pages/*</ignore>
        <ignore>includes/third-party/*</ignore>
        <ignore>vendor/*</ignore>
        <ignore>reference/docs/*</ignore>
        <ignore>storage/*</ignore>
        <ignore>views/*</ignore>
        <ignore>index.php</ignore> <!-- Ignore all the index.php files -->
    </files>
</phpdoc>

Ignoring vendor directory should be the first step to start with.