| [1c92d58] | 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@",
|
|---|
| [92c9c7c] | 25 | "webserviceBaseUrl" => "http://localhost@WEBSERVICE_BASE_URL@/",
|
|---|
| [1c92d58] | 26 | ];
|
|---|
| 27 |
|
|---|
| [92c9c7c] | 28 | ///////////////////////////
|
|---|
| 29 | //
|
|---|
| 30 | // DO NOT MODIFY THIS FILE BELOW THIS LINE
|
|---|
| 31 | //
|
|---|
| 32 | ///////////////////////////
|
|---|
| 33 |
|
|---|
| 34 | $config["dataDirectory"] = "data";
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| [1c92d58] | 37 | function getConfig($key){
|
|---|
| 38 | global $config;
|
|---|
| 39 |
|
|---|
| 40 | if(!arraY_key_exists($key, $config)){
|
|---|
| 41 | error_log("Expected config value ". $key ." does not exists");
|
|---|
| 42 | return FALSE;
|
|---|
| 43 | }
|
|---|
| 44 | return $config[$key];
|
|---|
| 45 | }
|
|---|
| 46 |
|
|---|
| 47 | if(getConfig("mode") == "development"){
|
|---|
| 48 | error_reporting(E_ALL);
|
|---|
| 49 | }
|
|---|
| 50 |
|
|---|
| 51 | set_include_path(get_include_path() . PATH_SEPARATOR . "../vendor/");
|
|---|
| [92c9c7c] | 52 | require("../vendor/autoload.php");
|
|---|
| [1c92d58] | 53 |
|
|---|
| 54 | ?>
|
|---|