nicotec/doctrineauto-bundle

MySQL为Doctrine生成实体 - doctrine反向工程自动

安装: 115

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 0

开放问题: 0

类型:symfony-bundle

dev-master 2014-12-16 16:33 UTC

This package is not auto-updated.

Last update: 2024-09-14 14:24:33 UTC


README

从MySQL自动生成 doctrine2 的实体生成器

支持

  • GedmoDoctrineExtension > stof.
  • 用户和角色。

安装

  1. 使用 Composer 下载库
php composer.phar require nicotec/doctrineauto-bundle
// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        if (in_array($this->getEnvironment(), array('dev', 'test'))) {
            $bundles[] = new Nicotec\DoctrineautoBundle\NicotecDoctrineautoBundle();
        }
        // ...
    );
}
// app/config/routing_dev.yml
nicotec_doctrineauto:
    resource: "@NicotecDoctrineautoBundle/Controller/"
    type:     annotation
    prefix:   /doctrineauto
// app/config.yml
#exemple
parameters:
    generator:
        default_mapping: default
        mappings:
            default:
                bdd_namespace: Bo\AdminBundle
                security:
                    entity: Superuser
                    property: username
                superclass: 1
            config:
                bdd_namespace: Bo\SuperBundle
                security:
                    entity: User
                    property: username
                superclass: 1
                table_ignores:
#                    - user
#                    - role
            mail:
                bdd_namespace: Bo\MailerBundle
                superclass: 1

使用

http://.../app_dev.php/doctrineauto