Browse Source

update config class

master
o.moresis 7 months ago
parent
commit
8a1831ca4b
  1. 25
      src/Config.php

25
src/Config.php

@ -91,21 +91,15 @@ class Config { @@ -91,21 +91,15 @@ class Config {
public static function getDatabaseCreds($mode = self::MODE)
{
$host = getenv("DB_HOST") ?: "192.168.11.45";
$name = getenv("DB_NAME") ?: "newschema";
$user = getenv("DB_USER") ?: "vaslak";
$pass = getenv("DB_PASS") ?: "postgre2020";
$host = getenv("DB_HOST")
$name = getenv("DB_NAME")
$user = getenv("DB_USER")
$pass = getenv("DB_PASS")
return array($host, $name, $user, $pass); //self::DB_CREDS['USER'], self::DB_CREDS['PASS']);
}
// GEOSERVER API CONSTANTS
// public static function getAPIBaseURL($api_name) {
// return self::API_URL[$api_name];
// }
//
public static function getAPICredentials($api_name)
{
$username = getenv("{$api_name}_USER");
@ -114,16 +108,5 @@ class Config { @@ -114,16 +108,5 @@ class Config {
return array("username" => $username, "password" => $password);
}
// public static function getAPICredentials($api_name)
// {
// self::$api_creds = array(
// "REPO" => getenv("CREDS_REPO"),
// "GSRV" => getenv("CREDS_GSRV"),
// "POSD" => getenv("CREDS_POSD"),
// "WFD" => getenv("CREDS_WFD")
// );
//
// return self::$api_creds[$api_name];
// }
}

Loading…
Cancel
Save