README.md 1.01 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
API documentation generator for Yii 2
=====================================

This extension provides an API documentation generator for the Yii framework 2.0.

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

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
14
php composer.phar require --prefer-dist yiisoft/yii2-apidoc "*"
15 16 17 18 19
```

or add

```json
20
"yiisoft/yii2-apidoc": "*"
21 22 23 24 25 26 27
```

to the require section of your composer.json.

Usage
-----

Carsten Brandt committed
28 29 30 31 32 33 34 35 36 37 38
To generate API documentation, run the `apidoc` command.

```
vendor/bin/apidoc source/directory ./output
```

By default the `offline` template will be used. You can choose a different templates with the `--template=name` parameter.
Currently there is only the `offline` template available.

You may also add the `yii\apidoc\commands\RenderController` to your console application class map and
run it inside of your applications console app.
39 40 41 42 43 44 45 46 47

Creating your own templates
---------------------------

TDB

Using the model layer
---------------------

48
TDB