Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Doctrine ORM service provider extension for Silex
PHP

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
nbproject
src/Mparaiso
tests
.gitignore
.travis.yml
LICENSE
README.md
SYMFONY LICENSE
composer.json
console.php
phpunit.xml

README.md

Doctrine ORM Service Provider

Build Status

Doctrine ORM silex extension

author : M.Paraiso contact: mparaiso@online.fr

status: work in progress

helps use Doctrine ORM with silex

Configuration

here is a configuration exemple for silex:

$app->register(new ConsoleServiceProvider); // to manage entities through command line.
$app->register(new DoctrineServiceProvider,array(
        "db.options"=> array(
            "dbname"   =>  getenv("DBNAME"),
            "user"     => getenv("USER"),
            "password" => getenv("PASSWORD"),
            "host"     => getenv("_HOST"),
            "driver"   => "pdo_mysql",
)));

$app->register(new DoctrineORMServiceProvider, array(
       "orm.driver.configs"    => array(
           "default" => array(
               "namespace"=>"Entity",  // rootnamespace of your entities
               "type"  => "yaml", // driver type (yaml,xml,annotation)
               "paths" => array(__DIR__ . '/doctrine'), // config file path
           )
       )
   ));

Services :

  • orm.em : EntityManager
  • orm.manager_registry : Manager registry
Something went wrong with that request. Please try again.