How is Yii's API documentation generated?

I really like the clean structure of Yii’s API documentation. I need to document a project so I tried PhpDoc but it produces cluttered, frame-based HTML. What is being used to produce the Yii documentation?

Using PHPDoc, as I know, you can define your own templates without frames and styled as you like.

It is actually simpler than phpdoc, see http://code.google.com/p/yii/source/browse/#svn/trunk/build/commands/api

I went through the code (looks great), but can’t find part responsible for generating documentation… is it separate closed application?

Ok, found text files in /trunk/docs/guide and latex command to generate .tex files, but still cant find code responisble for managing it and viewing it like on Yii guide…

I had a look through it just now, i think you do this to generate the api.

  1. Add build to your path config for your environment variables if you are using windows. Run cmd.exe and type in the command line interface "build api <path> <mode>" without the quotes.

path is the path you want the api to be generated to and mode is whether the api is for online or offline use which is optional.

I was imprecise, sorry… I was thinking about generating guide part of documentation (not api). As far I can see guys from http://yiiframework.ru/ managed to do this (I mean manipulate guide to create their own).

There’s a separate project for translating the guide. It also contains an application to display the guide (check the README):

http://code.google.com/p/yiidoc

Thx Mike, that’s what I was looking for :)

spamec

At yiiframework.ru we are using modified code that is bundled with yiidoc project. I’ve made a few image path fixes, added some features like translation actuality checking and refactored it.

btw., we have not yet managed to automate CHM/PDF guide generation. If someone knows a good way, it will help us a lot.

Everything needed to generate API (HTML, CHM) and guide (HTML, PDF) can be found under http://code.google.com/p/yii/source/browse/#svn/trunk/build

Take a look at build.xml (this is used by "phing" tool) under "doc" target to know how to use these tools.

Thanks, will check it.

Had a great trouble while trying to generate documentation with phpdoc ver. >= 3.5.0,

Worked fine with phpdoc ver 3.4.15

By the way, is it possible to use this tool to create docs for my own projects?

phpDocumentor is not used for Yii API docs generation but there should be no trouble generating docs with it. What is your trouble exactly?

Problems with generating docs for my own code because yii doc gen is hardcoded for yii.

I changed ApiCommand.php line 125


$model=$this->buildModel(YII_PATH,$options);

to my own path and now I’m having a terrible amount of response text in shell. It’s so big - I can’t see the beginning of the error and don’t know the reason.

I was wondering maybe smb else ( eg the gen author :) ) thought about using the gen not only to yii?

I too dislike phpDocumentor.

It’s last release was in 2008, it’s written in php4, it has own gui and I had to examine the source to create my own console wrapper around it.

Though, it was about a year ago and I can be mistaking.