Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Doctrine2 ORM storage adapter for ZfcUser.
PHP
Branch: master

Merge pull request #94 from marcosh/patch-1

Add backticks to table name
latest commit 252d77f55e
@Danielss89 Danielss89 authored

README.md

ZfcUserDoctrineORM

Version 0.1.1 Created by Kyle Spraggs and the ZF-Commons team

Introduction

ZfcUserDoctrineORM is a Doctrine2 ORM storage adapter for ZfcUser.

Options

The following options are available:

  • enable_default_entities - Boolean value, determines if the default User entity should be enabled. Set it to false in order to extend ZfcUser\Entity\User with your own entity. Default is true.

Dependencies

Installation

Set up Database Connection Settings for Doctrine ORM:

Namely, go to Doctrine Connection Settings, and copy/paste/modify the example configuration file content into your config/autoload/doctrine.orm.local.php.

Install Zfc Components:

php composer.phar require zf-commons/zfc-user-doctrine-orm

Set up your Modules in config/application/application.config.php, something like

'modules' => array(
    'DoctrineModule',
    'DoctrineORMModule',
    'ZfcBase',
    'ZfcUser',
    'ZfcUserDoctrineORM',
    'Application',
),

Now, you can use ZfcUser SQL schema to set up your database tables.

Alternatively, you can use doctrine-module to do this work for you:

vendor/bin/doctrine-module orm:schema-tool:update --dump-sql

Note: If you want to use a different table schema or user entity then you have to set enable_default_entities to false in the zfcuser config file

If SQL looks okay, do:

vendor/bin/doctrine-module orm:schema-tool:update --force

You can now navigate to /user and it should work.

Something went wrong with that request. Please try again.