Yii 1.1: yiidocsgenerator

Generates Yii style documentation for your Yii web app
26 followers

Generates nice HTML documentation from your Yii app source code, just a quick hack of the doc builder from Yii's build process.

Usage

/.yiic docs check - Checks the source code to see if there's any classes that are lacking documentation, good for quality checking

./yiic docs path/to/your/docs/folder - Generates the site documentation in the specified folder (which must exist)

./yiic docs path/to/your/docs/folder noviews - Generates the site documentation but ignores view files.

Read the wiki

Resources

Total 11 comments

#17116 report it
jcsmesquita at 2014/05/05 10:55am
Omitting Yii framework classes

In case anybody is wondering how to generate documentation without Yii parent classes. Here's a quick fix:

Edit the commands/DocsCommand.php file, at line 297:

foreach(CFileHelper::findFiles(YII_PATH,$this->yiiOptions) as $file) {
    $files[] = $file;
}

comment/remove that foreach loop:

/*
foreach(CFileHelper::findFiles(YII_PATH,$this->yiiOptions) as $file) {
    $files[] = $file;
}
*/

Now it should only generate docs for the files in your application.

#13729 report it
demo.ideaentity at 2013/06/20 05:25am
Anyone had any luck documenting their project with this tool

I tried this tool a lot to work in my conditions like debugged (DocsCommand.php, DocsModel.php) code, excluded some folders, explicitly imported models and controllers in my modules classes and what not but still my project files are not being documented(some views which are in main layouts and some other files related to yii-mail extension). Only framework related files are being documented in a folder named 'api' at given path but those files are not relevant to me.
I want documentation for my project and not Yii.

I already tried phpDocumenter which I installed through PEAR but it is not giving me satisfying results because it considers my project as a regular PHP project but mine is Yii and I could definitely use some Yii related documentation. For now I document my project with phpDocumenter because yiidocsgenerator is not working for me as expected.

If anyone has successfully documented their project with this tool then please help me.

#12218 report it
pommeverte at 2013/03/07 07:47am
failed to open stream

I get a failed to open stream on almost every file. Using Yii 1.1.12 just one example is the following:

PHP Error[2]: include(rYii.php): failed to open stream: No such file or directory
    in file /path/to/app/lib/yii-1.1.12.b600af/framework/YiiBase.php at line 423

But I've really been removing so many manually, this however I can't tdo anything about as it's a core file.

#6215 report it
aquasite.pl at 2011/12/19 05:49pm
RE: Problem generating site documentation

@arrsof In protected/config/console You should add this code:

'import' => array(
        'ext.giix-components.*',
),
#5961 report it
Sofia Arrambide at 2011/11/30 12:59pm
Problem generating site documentation

I used the yiic docs check command, and all the models seem to finally pass the check. So, I proceeded to executing this command:

yiic docs C:\path to my site\protected\models

And at first this appears onscreen:

Building.. : MyApplication Class Reference
Version... : 1.1.7
Source URL:

And then this error pops up:

Building model...
PHP Error[2]:include<GxActiveRecord.php>: failed to open stream: No such file or directory in file C:\path-to-my-app\yii\framework\YiiBase.php at line 396

Where, at that line, I have the following code:

include($className.'.php');

Any ideas? I really want to get this working!!

#4742 report it
geocine at 2011/08/10 02:01pm
documenting controllers?

How do I document controllers when I have two modules which have for example same controller names "DefaultController" and the generator complains.

Fatal error: Cannot redeclare class DefaultController
#4000 report it
JFReyes at 2011/05/25 05:39pm
Good work!

Thanks for the extension, it's helping me with the drudgery of documentation. I added

$public copyright;

to class BaseDoc in DocsModel.php to display the copyright notice as well.

What I couldn't easily figure out is how to change the behavior so that the inherited stuff (methods/properties/etc.) doesn't show by default because I find it distracting. I played with the Javascript functions in layouts/main.php but couldn't get them to work as I wanted. I would also like the page title to display my app's name and not "My Console Application". Any ideas? Thanks.

#3955 report it
Asgaroth at 2011/05/23 02:22pm
@cstdenis

really? cause as soon as I click the url I get a page with a medium size "Download" button which when clicked gives me a compressed file in either zip or tar.gz format.

#3952 report it
Cstdenis at 2011/05/23 02:09pm
@Asgaroth

Yes. It's downloads link says "Sorry, there aren't any downloads for this repository."

I suppose I could copy/paste the source of each file one at a time from the web git interface, but not exactly an efficient procedure.

I could also install git and learn how to use it, but I really shouldn't need to just to download an extension.

#3949 report it
Asgaroth at 2011/05/23 01:46pm
@cstdenis

checked the project page?

#3948 report it
Cstdenis at 2011/05/23 01:40pm
No download?

"No downloadable files yet"

Leave a comment

Please to leave your comment.

Create extension
Downloads
No downloadable files yet