WIP: Untested, solo caricati file di test

This commit is contained in:
Riccardo Di Dato
2020-09-23 00:05:00 +02:00
parent 0c74df1983
commit d1f4f4c50c
44 changed files with 1034 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
<?php
/*
* Comment this file content if the service doesn't use any database
*
* Author: Riccardo Di Dato
* Creation Date: 14 dic 2016
*/
use ASD\DB\DaoRegistry;
use ASD\DB\Mongo\MongoDao;
$dbName = getenv("ASD_MONGO_DBNAME");
$dbUser = getenv("ASD_MONGO_USER");
$dbPass = getenv("ASD_MONGO_PASSWORD");
$dbLocation = getenv("ASD_MONGO_LOCATION");
$connectionString = "mongodb://".$dbUser.":".$dbPass."@".$dbLocation."/".$dbName;
if ($dbUser === false || $dbPass === false) {
$connectionString = "mongodb://".$dbLocation."/".$dbName;
}
DaoRegistry::addDao(new MongoDao("main", $dbName, $connectionString), true);
?>