-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.php
33 lines (28 loc) · 924 Bytes
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Created by PhpStorm.
* User: moribus
* Date: 21/01/2016
* Time: 23:19
*/
use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\EntityManager;
require_once "vendor/autoload.php";
require_once "autoload.php";
include 'connexion.inc.php';
// Create a simple "default" Doctrine ORM configuration for Annotations
$isDevMode = true;
$config = Setup::createAnnotationMetadataConfiguration(array(__DIR__."/Ousse/Entite"), $isDevMode);
// or if you prefer yaml or XML
//$config = Setup::createXMLMetadataConfiguration(array(__DIR__."/config/xml"), $isDevMode);
//$config = Setup::createYAMLMetadataConfiguration(array(__DIR__."/config/yaml"), $isDevMode);
// database configuration parameters
$conn = array(
'dbname' => $dbname,
'user' => $user,
'password' => $pwd,
'host' => $host,
'driver' => 'pdo_mysql',
);
// obtaining the entity manager
$entityManager = EntityManager::create($conn, $config);