sergiors/doctrine-orm-service-provider

1.0.0 2017-12-11 01:35 UTC

This package is not auto-updated.

Last update: 2024-11-08 15:18:08 UTC


README

Build Status

Install

composer require sergiors/doctrine-orm-service-provider "dev-master"

How to use

Something like this

use Silex\Provider\DoctrineServiceProvider;
use Sergiors\Pimple\Provider\DoctrineOrmServiceProvider;
use Sergiors\Pimple\Provider\DoctrineCacheServiceProvider;

$app->register(new DoctrineServiceProvider(), [
    // your db config
]);
$app->register(new DoctrineCacheServiceProvider());
$app->register(new DoctrineOrmServiceProvider(), [
    'orm.proxy_dir' => '',
    'orm.proxy_namespace' => ''
]);

$app['orm']->getRepository('Namespace\Entity\User')->findAll();

License

MIT