tonis-io / doctrine-orm
Installs: 101
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
pkg:composer/tonis-io/doctrine-orm
Requires
- php: >=5.5
- doctrine/orm: ^2.5
Requires (Dev)
- phpunit/phpunit: ^4.0
- squizlabs/php_codesniffer: ^2.0
- tonis-io/tonis: ^1.0@dev
This package is not auto-updated.
Last update: 2022-02-01 12:49:59 UTC
README
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' ], ];