2017 © Pedro Peláez
 

library doctrine-orm-provider

Simple Doctrine ORM provider for Silex

image

raztud/doctrine-orm-provider

Simple Doctrine ORM provider for Silex

  • Saturday, September 27, 2014
  • by raztud
  • Repository
  • 1 Watchers
  • 1 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Doctrine ORM Service Provider for Silex

This provider sets up Doctrine ORM for Silex., (*1)

Summary: * Installation * Configuration * Usage, (*2)

Installation

Add the bundle to your composer.json, (*3)

{
    "require": {
        ...
        "raztud/doctrine-orm-provider": "1.0.0"
    }
}

Tell to composer to download the bundle by running the command:, (*4)

``` bash $ php composer.phar update raztud/doctrine-orm-provider, (*5)


Composer will install the bundle to your project's `vendor/raztud` directory. ## Configuration First of all you should have the Doctrine DBAL connection configured. For more information about configuring the DoctrineServiceProvider, I'd recommend reading [this page of the Silex documentation](http://silex.sensiolabs.org/doc/providers/doctrine.html). Registering the Doctrine ORM Service Provider is rather straight forward: ```php <?php /* ... */ $app->register(new Raztud\Provider\DoctrineORMServiceProvider(), array( 'db.connection' => $app['db'], 'db.is_dev_mode' => false, 'db.orm.entities_paths' => array(__DIR__ . '/../src/MyProject/Entity') )); /* ... */

OR, (*6)

<?php

/* ... */

$app->register(new Raztud\Provider\DoctrineORMServiceProvider(), array(
    'db.connection' => array(
        'driver'   => 'pdo_mysql',
        'user'     => '<USERNAME>',
        'password' => '<PASSWORD>',
        'dbname'   => '<DATABASE>',
    ),
    'db.is_dev_mode' => true, 
    'db.orm.entities_paths'  => array(__DIR__ . '/../src/MyProject/Entity')
));

/* ... */

Usage

You can access the EntityManager by calling $app['db.doctrine.em']., (*7)

The Versions

27/09 2014

dev-master

9999999-dev https://github.com/raztud/silex-orm-provider.git

Simple Doctrine ORM provider for Silex

  Sources   Download

MIT

The Requires

 

orm database extension silex doctrine provider

27/09 2014

1.0.1

1.0.1.0 https://github.com/raztud/silex-orm-provider.git

Simple Doctrine ORM provider for Silex

  Sources   Download

MIT

The Requires

 

orm database extension silex doctrine provider

26/09 2014

1.0.0

1.0.0.0 https://github.com/raztud/silex-orm-provider.git

Simple Doctrine ORM provider for Silex

  Sources   Download

MIT

The Requires

 

orm database extension silex doctrine provider