bitweb / doctrine-entity-generator-module
此包已被 废弃 并不再维护。未建议任何替代包。
此包的最新版本(1.0)没有可用的许可证信息。
Doctrine 实体生成模块
1.0
2014-03-12 18:00 UTC
Requires
- php: >=5.3.3
- doctrine/doctrine-orm-module: 0.8.*
- zendframework/zendframework: 2.2.*
This package is auto-updated.
Last update: 2023-06-21 16:50:46 UTC
README
为 Zend Framework 2 设计的 Doctrine 实体生成模块。
添加模块
php composer.phar require bitweb/doctrine-entity-generator-module
# (When asked for a version, type `1.*`)
或者将以下内容添加到 composer.json
"require": { "bitweb/doctrine-entity-generator-module": "1.*", }
在 APP_ROOT/config/application.config.php
中加载模块
'modules' => array( 'DoctrineModule', 'DoctrineORMModule', 'Application', 'DoctrineEntityGeneratorModule' ),
此模块需要在 module.config.php
中为 ServiceManager 添加初始化器
'service_manager' => array( 'initializers' => array ( function ($service, $sm) { if ($service instanceof ObjectManagerAwareInterface) { $service->setObjectManager($sm->get('doctrine.entitymanager.orm_default')); } } ), )
这是模块使用项目的对象管理器所必需的。
现在,可以通过 http://example.com/yourproject/dev
访问 Web 界面以生成实体。