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.
No download?
"No downloadable files yet"
@cstdenis
checked the project page?
@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.
@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.
Good work!
Thanks for the extension, it's helping me with the drudgery of documentation. I added
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.
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
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!!
RE: Problem generating site documentation
@arrsof In protected/config/console You should add this code:
'import' => array( 'ext.giix-components.*', ),
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.
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.
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.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.