proprietes-privees / zfc-user-doctrine-orm
为 ZfcUser 的 Doctrine2 ORM 存储适配器。
1.0
2016-02-02 10:37 UTC
Requires
- php: >=5.3.3
- doctrine/doctrine-orm-module: 0.*
- proprietes-privees/zfc-user: >=1.0
This package is not auto-updated.
Last update: 2024-09-20 18:23:41 UTC
README
版本 0.1.1 由 Kyle Spraggs 和 ZF-Commons 团队创建
简介
ZfcUserDoctrineORM 是 ZfcUser 的 Doctrine2 ORM 存储适配器。
选项
以下选项可用:
- enable_default_entities - 布尔值,确定是否启用默认用户实体。将其设置为 false 以扩展 ZfcUser\Entity\User 为您自己的实体。默认为 true。
依赖关系
安装
设置 Doctrine ORM 数据库连接设置
具体来说,转到 Doctrine 连接设置,并将示例配置文件内容复制/粘贴/修改到您的 config/autoload/doctrine.orm.local.php。
安装 Zfc 组件
php composer.phar require zf-commons/zfc-user-doctrine-orm
在 config/application/application.config.php 中设置您的模块,例如:
'modules' => array(
'DoctrineModule',
'DoctrineORMModule',
'ZfcBase',
'ZfcUser',
'ZfcUserDoctrineORM',
'Application',
),
现在,您可以使用 ZfcUser SQL 模式 来设置您的数据库表。
或者,您可以使用 doctrine-module 来为您完成这项工作
vendor/bin/doctrine-module orm:schema-tool:update --dump-sql
如果 SQL 查看无误,请执行以下操作:
vendor/bin/doctrine-module orm:schema-tool:update --force
现在,您可以通过访问 /user 来导航,它应该可以工作。