public function __construct($dbConnection = null)
 {
     if (empty($dbConnection)) {
         $this->connection = Database::getInstance()->getConnection();
     } else {
         $this->connection = $dbConnection;
     }
 }
 private function setupDatabaseConnection()
 {
     if (Config::useDatabase()) {
         Database::getInstance()->connect(Config::getDatabaseDialect(), Config::getDatabaseHost(), Config::getDatabasePort(), Config::getDatabaseUser(), Config::getDatabasePassword(), Config::getDatabaseName(), Config::getDatabaseCharset());
     }
 }