Yii2 framework backup
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Alexander Makarov 0c14f47f9a Fixes #3793: Changed inline autocomplete hints style to get more IDEs support 10 years ago
..
commands first approach to a PDF guide 10 years ago
components fixed all the PHPdoc in extensions 11 years ago
helpers improved HTML guide navigation 10 years ago
models fixed apidoc short description 10 years ago
renderers improved HTML guide navigation 10 years ago
templates Fixes #3793: Changed inline autocomplete hints style to get more IDEs support 10 years ago
.gitignore psr-4 change. 11 years ago
CHANGELOG.md prepare for next release. 11 years ago
LICENSE.md psr-4 change. 11 years ago
README.md generate PDF file chapters from README.md structure 10 years ago
apidoc fixed docblock 11 years ago
apidoc.bat psr-4 change. 11 years ago
composer.json first approach to a PDF guide 10 years ago

README.md

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.

Either run

php composer.phar require --prefer-dist yiisoft/yii2-apidoc "*"

or add

"yiisoft/yii2-apidoc": "*"

to the require section of your composer.json.

Usage

This extension offers two commands:

  • api to generate class API documentation.
  • guide to render nice HTML pages from markdown files such as the yii guide.

Simple usage for stand alone class documentation:

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

Simple usage for stand alone guide documentation:

vendor/bin/apidoc guide source/docs ./output

You can combine them to generate class API and guide doc in one place:

# first generate guide docs to allow links from code to guide you may skip this if you do not need these.
vendor/bin/apidoc guide source/docs ./output
# second generate API docs
vendor/bin/apidoc api source/directory ./output
# third run guide docs again to have class links enabled
vendor/bin/apidoc guide source/docs ./output

By default the bootstrap template will be used. You can choose a different templates with the --template=name parameter. Currently there is only the bootstrap 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.

Creating a PDF from the guide

You need pdflatex and make for this.

vendor/bin/apidoc guide source/docs ./output --template=pdf
cd ./output
make pdf

If all runs without errors the PDF will be guide.pdf in the output dir.

Creating your own templates

TDB

Using the model layer

TDB