first commit
This commit is contained in:
+91
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
'hostname' => '10.10.33.21',
|
||||
'username' => 'savvy',
|
||||
'password' => 'savvy001!',
|
||||
'database' => 'savvy',
|
||||
'DBDriver' => 'Postgre',
|
||||
'DBPrefix' => '',
|
||||
|
||||
|
||||
*/
|
||||
|
||||
class savvyext_api_savvy{
|
||||
var $database=
|
||||
[
|
||||
"host" => "10.10.33.21",
|
||||
"name" => "savvy",
|
||||
"user" => "savvy",
|
||||
"pass" => "savvy001!",
|
||||
"port" => "5432"
|
||||
];
|
||||
|
||||
var $gpsdatabase=
|
||||
[
|
||||
"host" => "172.31.12.248",
|
||||
"name" => "savvy_gps",
|
||||
"user" => "savvy",
|
||||
"pass" => "savvy001!",
|
||||
"port" => "5432"
|
||||
];
|
||||
|
||||
|
||||
var $database_replica=
|
||||
[
|
||||
"host" => "10.10.33.21",
|
||||
"name" => "savvy",
|
||||
"user" => "savvy",
|
||||
"pass" => "savvy001!",
|
||||
"port" => "5432"
|
||||
];
|
||||
|
||||
var $google=
|
||||
[
|
||||
"api_key" => "AIzaSyBMNecOHz0OHbJti5P9foh_PVPYZntr18I",
|
||||
"api_key_old" => "AIzaSyDvjiRTxngOQyBP4zpqFlZuiquc0ROvo9c",
|
||||
"drive_client_id" => "343605975098-frdrsttkgkih8dm19js6itgs6ps261ea.apps.googleusercontent.com",
|
||||
"drive_client_secret" => "XbUr5SW9Y1CaEjO_3fvglRna",
|
||||
"drive_card_images" => "1NjftJBnFj9zTqWX7GLDhvlh28JOMeqv3",
|
||||
"storage_project_id" => "float-app-224118",
|
||||
"storage_auth_file" => "/home/savvy/savvy/savvyext/etc/float-app-224118-52ef1783d2c5.json",
|
||||
"kms_project_id" => "float-app-224118",
|
||||
"kms_auth_file" => "/home/savvy/savvy/savvyext/etc/float-app-224118-52ef1783d2c5.json",
|
||||
"kms_keyring_id" => "development",
|
||||
"kms_key_id" => "oauth2_tokens"
|
||||
];
|
||||
|
||||
public function cfgReadChar($varname){
|
||||
$pieces = explode(".", $varname);
|
||||
if ( $pieces[0] == 'database'){
|
||||
return $this->database[$pieces[1]];
|
||||
}
|
||||
|
||||
if ( $pieces[0] == 'gpsdatabase'){
|
||||
return $this->gpsdatabase[$pieces[1]];
|
||||
}
|
||||
if ( $pieces[0] == 'database_replica'){
|
||||
return $this->database_replica[$pieces[1]];
|
||||
}
|
||||
|
||||
|
||||
if ( is_array($this->$pieces[0])){ return $this->$pieces[0][$pieces[1]];
|
||||
}else {return [];}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function cfgReadLong($varname){
|
||||
return $this->cfgReadChar($varname);
|
||||
}
|
||||
public function savvyext_api($in){
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!array_key_exists('savvyext', $GLOBALS)) {
|
||||
$savvyext = new savvyext_api_savvy();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user