{"id":15652453,"url":"https://github.com/cornernote/gii-modeldoc-generator","last_synced_at":"2026-02-26T16:34:36.379Z","repository":{"id":12634842,"uuid":"15306275","full_name":"cornernote/gii-modeldoc-generator","owner":"cornernote","description":"Extends Gii allowing an update to existing models with phpDocumentor compatible tags.","archived":false,"fork":false,"pushed_at":"2017-05-19T09:40:46.000Z","size":250,"stargazers_count":12,"open_issues_count":3,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-30T20:08:27.928Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://cornernote.github.io/gii-modeldoc-generator","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cornernote.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-19T08:29:35.000Z","updated_at":"2021-01-28T10:51:24.000Z","dependencies_parsed_at":"2022-09-23T08:30:25.927Z","dependency_job_id":null,"html_url":"https://github.com/cornernote/gii-modeldoc-generator","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cornernote%2Fgii-modeldoc-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cornernote%2Fgii-modeldoc-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cornernote%2Fgii-modeldoc-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cornernote%2Fgii-modeldoc-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cornernote","download_url":"https://codeload.github.com/cornernote/gii-modeldoc-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251774896,"owners_count":21641731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T12:42:24.508Z","updated_at":"2026-02-26T16:34:31.356Z","avatar_url":"https://github.com/cornernote.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gii ModelDoc Generator for Yii\n\nModelDoc Generator will extend Gii allowing an update to existing models with [phpDoc](http://phpdoc.org/docs/latest/index.html) compatible documentation.\n\n\n## Features\n\n- **Table Fields**\n  - Adds properties for each field.\n  - Properties are annotated with field comments from the database.\n- **Relations**\n  - Adds a property with a return type for each relation.\n- **CActiveRecord Inheritance**\n  - Adds methods inherited from CActiveRecord including: find(), findByPk(), findByAttributes(), fndBySql(), findAll(), findAllByPk(), findAllByAttributes(), findAllBySql(), with(), together(), cache(), resetScope(), populateRecord() and populateRecords().\n- **Behaviors** \n  - Adds a property with a return type for each behavior.\n  - Adds methods assigned for behaviors, unless it is defined by the model itself.\n  - Optionally uses @mixin for behaviors.\n- **Scopes**\n  - Adds a method for each scope.\n- **Full Syntax**\n  - All PHPDoc tags contain full syntax including: method params and return types.\n  - All returned models have namespace support.\n\n\n## Screenshots\n\nListing all the models that are going to have phpDocs inserted:\n![Files](https://raw.github.com/cornernote/gii-modeldoc-generator/master/screenshot/files.png)\n\nPreview of the model before it gets updated:\n![Preview](https://raw.github.com/cornernote/gii-modeldoc-generator/master/screenshot/preview.png)\n\n\n## Installation\n\nPlease download using ONE of the following methods:\n\n\n### Composer Installation\n\nAll requirements are automatically downloaded into the correct location when using composer.  There is no need to download additional files or set paths to third party files.\n\nGet composer:\n\n```\ncurl http://getcomposer.org/installer | php\n```\n\nInstall latest release OR development version:\n\n```\nphp composer.phar require cornernote/gii-modeldoc-generator:*\t\t\t\t// latest release\nphp composer.phar require cornernote/gii-modeldoc-generator:dev-master\t// development version\n```\n\nAdd the `vendor` folder to the `aliases` in your yii configuration:\n\n\n### Manual Installation\n\nDownload the [latest release](https://github.com/cornernote/gii-modeldoc-generator/releases/latest) or [development version](https://github.com/cornernote/gii-modeldoc-generator/archive/master.zip) and move the `gii-modeldoc-generator` folder into your `protected/modules` folder.\n\n\n## Configuration\n\nAdd the path to `gii-modeldoc-generator` to the `generatorPaths` in your gii configuration:\n\n```php\nreturn array(\n\t'modules' =\u003e array(\n\t\t'gii' =\u003e array(\n\t\t\t'class'=\u003e'system.gii.GiiModule',\n\t\t\t'generatorPaths' =\u003e array(\n\t\t\t\t// use this if you installed with composer\n\t\t\t\t'/path/to/vendor/cornernote/gii-modeldoc-generator/gii',\n\n\t\t\t\t// OR, use this if you downloaded into your extensions folder\n\t\t\t\t//'ext.gii-modeldoc-generator.gii',\n\t\t\t),\n\t\t),\n\t),\n);\n```\n\n## Usage\n\nEnsure you have `--- BEGIN ModelDoc ---` and `--- END ModelDoc ---` in each of your models, for example:\n\n```php\n/**\n * Your class description that will not be altered by ModelDoc\n *\n * --- BEGIN ModelDoc ---\n *\n *  this section will be replaced by ModelDoc\n *\n * --- END ModelDoc ---\n */\nclass MyModel extends CActiveRecord { ... }\n```\n\nVisit `index.php?r=gii`, then choose ModelDoc from the menu.\n\n\n## Notes\n\nThis extension will not create any new model files.  You should first create them or generate them with a model generator.\n\n\n## Resources\n\n- **[Documentation](http://cornernote.github.io/gii-modeldoc-generator)**\n- **[GitHub Project](https://github.com/cornernote/gii-modeldoc-generator)**\n- **[Yii Extension](http://www.yiiframework.com/extension/gii-modeldoc-generator)**\n\n\n## Support\n\n- Does this README need improvement?  Go ahead and [suggest a change](https://github.com/cornernote/gii-modeldoc-generator/edit/master/README.md).\n- Found a bug, or need help using this project?  Check the [open issues](https://github.com/cornernote/gii-modeldoc-generator/issues) or [create an issue](https://github.com/cornernote/gii-modeldoc-generator/issues/new).\n\n\n## License\n\n[BSD-3-Clause](https://raw.github.com/cornernote/gii-modeldoc-generator/master/LICENSE), Copyright © 2013-2014 [Mr PHP](mailto:info@mrphp.com.au)\n\n\n[![Mr PHP](https://raw.github.com/cornernote/mrphp-assets/master/img/code-banner.png)](http://mrphp.com.au) [![Project Stats](https://www.ohloh.net/p/gii-modeldoc-generator/widgets/project_thin_badge.gif)](https://www.ohloh.net/p/gii-modeldoc-generator)\n\n[![Latest Stable Version](https://poser.pugx.org/cornernote/gii-modeldoc-generator/v/stable.png)](https://github.com/cornernote/gii-modeldoc-generator/releases/latest) [![Total Downloads](https://poser.pugx.org/cornernote/gii-modeldoc-generator/downloads.png)](https://packagist.org/packages/cornernote/gii-modeldoc-generator) [![Monthly Downloads](https://poser.pugx.org/cornernote/gii-modeldoc-generator/d/monthly.png)](https://packagist.org/packages/cornernote/gii-modeldoc-generator) [![Latest Unstable Version](https://poser.pugx.org/cornernote/gii-modeldoc-generator/v/unstable.png)](https://github.com/cornernote/gii-modeldoc-generator) [![Build Status](https://travis-ci.org/cornernote/gii-modeldoc-generator.png?branch=master)](https://travis-ci.org/cornernote/gii-modeldoc-generator) [![License](https://poser.pugx.org/cornernote/gii-modeldoc-generator/license.png)](https://raw.github.com/cornernote/gii-modeldoc-generator/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcornernote%2Fgii-modeldoc-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcornernote%2Fgii-modeldoc-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcornernote%2Fgii-modeldoc-generator/lists"}