-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.php
More file actions
27 lines (22 loc) · 846 Bytes
/
bootstrap.php
File metadata and controls
27 lines (22 loc) · 846 Bytes
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
<?php
use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\EntityManager;
use Symfony\Component\VarDumper\VarDumper;
require_once "vendor/autoload.php";
// Create a simple "default" Doctrine ORM configuration for Annotations
$isDevMode = true;
$proxyDir = null;
$cache = null;
$useSimpleAnnotationReader = false;
$config = Setup::createAnnotationMetadataConfiguration(array(__DIR__."/src"), $isDevMode, $proxyDir, $cache, $useSimpleAnnotationReader);
// database configuration parameters
$conn = array(
'driver' => 'pdo_mysql',
'host' => '127.0.0.1',
'dbname' => 'projects',
'user' => 'root',
'password' => ''
);
$entityManager = EntityManager::create($conn, $config);
$projectsManager = new Projects\ProjectsManager($conn, $entityManager);
$employeesManager = new Employees\EmployeesManager($conn, $entityManager);