source: src/webservice/config/config.php.in@ 1c92d58

Last change on this file since 1c92d58 was 1c92d58, checked in by Joachim Langenbach <joachim.langenbach@…>, 11 years ago

First version of a getStations implementation and related tests

  • Property mode set to 100644
File size: 1.3 KB
Line 
1<?php
2/*
3 Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 MA 02110-1301 USA.
19*/
20
21$config = [
22 "version" => "@VERSION@",
23 "webserviceApiVersion" => "@WEBSERVICE_API_VERSION@",
24 "mode" => "@WEBSERVICE_MODE@",
25];
26
27function getConfig($key){
28 global $config;
29
30 if(!arraY_key_exists($key, $config)){
31 error_log("Expected config value ". $key ." does not exists");
32 return FALSE;
33 }
34 return $config[$key];
35}
36
37if(getConfig("mode") == "development"){
38 error_reporting(E_ALL);
39}
40
41set_include_path(get_include_path() . PATH_SEPARATOR . "../vendor/");
42require 'vendor/autoload.php';
43
44?>
Note: See TracBrowser for help on using the repository browser.