aboutsummaryrefslogtreecommitdiff
path: root/src/model/doctrine-bootstrap.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2026-10-23 00:47:32 +0200
committerpolo <ordipolo@gmx.fr>2026-10-23 00:47:32 +0200
commitf27cca08ff786ceff1870147f6d6bad14d71117f (patch)
treed36597a72025313d6faf4ed228755fa267ebe2f6 /src/model/doctrine-bootstrap.php
parentc7309f900ef05bd5cb313110ec159b761af394ec (diff)
downloadcms-f27cca08ff786ceff1870147f6d6bad14d71117f.tar.gz
cms-f27cca08ff786ceff1870147f6d6bad14d71117f.tar.bz2
cms-f27cca08ff786ceff1870147f6d6bad14d71117f.zip
dossiers avec majuscule, namespace pour toutes les classes, autoload psr-4, UserDataService::createZip déplacé dans Backup
Diffstat (limited to 'src/model/doctrine-bootstrap.php')
-rw-r--r--src/model/doctrine-bootstrap.php33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/model/doctrine-bootstrap.php b/src/model/doctrine-bootstrap.php
deleted file mode 100644
index 127f72f..0000000
--- a/src/model/doctrine-bootstrap.php
+++ /dev/null
@@ -1,33 +0,0 @@
1<?php
2// src/model/doctrine-bootstrap.php
3
4declare(strict_types=1);
5
6use Doctrine\ORM\ORMSetup;
7use Doctrine\DBAL\DriverManager;
8use Doctrine\ORM\EntityManager;
9
10require_once "../vendor/autoload.php";
11
12// Create a simple "default" Doctrine ORM configuration for Attributes
13$config = ORMSetup::createAttributeMetadataConfiguration(
14 //paths: array(__DIR__.'/entities'),
15 paths: array('../src/model/entities'),
16 isDevMode: true,
17 // true: cache en mémoire vive
18 // false: utilisation de APCu ou redis ou memcache
19);
20
21// configuring the database connection
22$connection = DriverManager::getConnection([
23 'driver' => Config::$db_driver,
24 'user' => Config::$user,
25 'password' => Config::$password,
26 'host' => Config::$db_host,
27 'dbname' => Config::$database,
28], $config);
29
30// obtaining the entity manager
31$entityManager = new EntityManager($connection, $config);
32
33foreach($entityManager->getMetadataFactory()->getAllMetadata() as $class){} \ No newline at end of file