- Timestamp:
- Aug 28, 2015, 3:29:08 PM (11 years ago)
- Branches:
- master
- Children:
- b858e6f
- Parents:
- 851179e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/webservice/htdocs/SiWeather/Webservice/WebserviceConfig.php
r851179e r1e37648 24 24 25 25 function __construct(){ 26 require(__DIR__ ."/../../ config/config.php");26 require(__DIR__ ."/../../../config/config.php"); 27 27 $this->_config = $config; 28 28 $this->loadAdditionalConfiguration(); … … 35 35 private function loadAdditionalConfiguration(){ 36 36 $this->_config["dataDirectory"] = "data"; 37 38 require(__DIR__ ."/../../inc/internalconfig.php"); 39 foreach(array_keys($internalconfig) as $key){ 40 if(array_key_exists($key, $this->_config)){ 41 error_log("Internal config entry ". $key ." already exists --> Keeping existing value and discard internal config value"); 42 } 43 else{ 44 $this->_config[$key] = $internalconfig[$key]; 45 } 46 } 37 47 } 38 48 … … 47 57 return $this->dataDirectory(); 48 58 } 59 if($key == "webserviceBaseUrl"){ 60 // error_log("Use dataDirectory() function to access this value"); 61 return $this->webserviceBaseUrl(); 62 } 49 63 50 64 return $this->_config[$key]; … … 52 66 53 67 public function dataDirectory(){ 54 return __DIR__ ."/../../". $this->_config["dataDirectory"]; 68 return __DIR__ ."/../../../". $this->_config["dataDirectory"]; 69 } 70 71 public function webserviceBaseUrl(){ 72 $baseUrl = $this->_config["webserviceBaseUrl"]; 73 if(substr($baseUrl, strlen($baseUrl) - 1, 1) != "/"){ 74 $baseUrl .= "/"; 75 } 76 return $baseUrl; 55 77 } 56 78
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/siweather/chrome/site/your_project_logo.png)