Example #1
0
 /**
  * DataManager constructor.
  * @param Configuration $conf
  */
 function __construct(Configuration $conf)
 {
     $this->message = "";
     try {
         $data = new \PDO('mysql:host=' . $conf->getDbHost() . ';dbname=' . $conf->getDbName() . '', $conf->getDbUser(), $conf->getDbPass());
         $this->data_manager = new \FluentPDO($data);
         $this->data_manager->debug = false;
     } catch (\Exception $ex) {
         $this->message = "Database connection failed : " . $ex->getMessage();
     }
 }