O'Reilly logo

Yii2 By Example by Fabrizio Caldarelli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Generating an API documentation

Documentation is definitively one of the most important aspects of an app, since it provides information about its flows and structures. Unfortunately, it is often omitted due to lack of time.

Yii give us a powerful tool to automatically generate a pretty documentation. Basically, it uses all the documentation comments present in the app, those starting with /** instead of the classic /*.

Therefore, we have the advantage that comments in the code are used to produce a complete documentation.

Inside these comments, there are few keywords that are usable according to the context—file, class, or function/method.

In case of a file, the most common keywords to put on top are:

  • @link url, where url is the reference URL linked ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required