tonis-io/doctrine-orm

This package is abandoned and no longer maintained. No replacement package was suggested.

dev-master / 1.0.x-dev 2015-09-01 14:49 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:49:59 UTC


README

Scrutinizer Code Quality Code Coverage Build Status

Tonis\DoctrineORM

Tonis\DoctrineORM is a package to configure a simple Doctrine ORM EntityManager.

Composer

composer require tonis-io/doctrine-orm

Usage

$entityManager = Tonis\DoctrineORM\EntityManagerFactory::create($config, $container)

Note: Container is optional and is used to pull the cache from if the cache is present as a string.

Configuration

The create() method accepts an array of of configuration. The following is an example with default values.

[
    'debug'      => true,
    'cache'      => null,
    'proxy_dir'  => null,
    'driver'     => [
        'type'   => self::DRIVER_ANNOTATION,
        'simple' => true,
        'paths'  => [],
    ],
    'connection' => [
        'driver' => 'pdo_mysql'
    ],
];