Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 11 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
Application | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | /** |
4 | * @copyright BerlinOnline Stadtportal GmbH & Co. KG |
5 | **/ |
6 | |
7 | namespace BO\Zmsadmin; |
8 | |
9 | use BO\Zmsclient\Http; |
10 | |
11 | define( |
12 | 'ZMS_ADMIN_TEMPLATE_FOLDER', |
13 | getenv('ZMS_ADMIN_TEMPLATE_FOLDER') ? getenv('ZMS_ADMIN_TEMPLATE_FOLDER') : '/templates/' |
14 | ); |
15 | |
16 | define( |
17 | 'ZMS_ADMIN_SESSION_DURATION', |
18 | getenv('ZMS_ADMIN_SESSION_DURATION') ? getenv('ZMS_ADMIN_SESSION_DURATION') : 28800 |
19 | ); |
20 | |
21 | if (!getenv('ZMS_CONFIG_SECURE_TOKEN')) { |
22 | throw new \RuntimeException('ZMS_CONFIG_SECURE_TOKEN environment variable must be set'); |
23 | } |
24 | |
25 | define('ZMS_CONFIG_SECURE_TOKEN', getenv('ZMS_CONFIG_SECURE_TOKEN')); |
26 | |
27 | class Application extends \BO\Slim\Application |
28 | { |
29 | /** |
30 | * Name of the application |
31 | * |
32 | */ |
33 | const IDENTIFIER = 'zms'; |
34 | |
35 | const MODULE_NAME = 'zmsadmin'; |
36 | |
37 | const DEBUG = false; |
38 | |
39 | const TWIG_CACHE = '/cache/'; |
40 | |
41 | const TEMPLATE_PATH = ZMS_ADMIN_TEMPLATE_FOLDER; |
42 | |
43 | const SESSION_DURATION = ZMS_ADMIN_SESSION_DURATION; |
44 | |
45 | public static $includeUrl = '/terminvereinbarung/admin'; |
46 | |
47 | /** |
48 | * allow cluster wide process calls |
49 | */ |
50 | |
51 | public static $allowClusterWideCall = true; |
52 | |
53 | /** |
54 | * image preferences |
55 | */ |
56 | |
57 | public static $isImageAllowed = false; |
58 | |
59 | /** |
60 | * language preferences |
61 | */ |
62 | const MULTILANGUAGE = true; |
63 | |
64 | public static $locale = 'de'; |
65 | public static $supportedLanguages = array( |
66 | // Default language |
67 | 'de' => array( |
68 | 'name' => 'Deutsch', |
69 | 'locale' => 'de_DE', |
70 | 'default' => true, |
71 | ), |
72 | // Other languages |
73 | 'en' => array( |
74 | 'name' => 'English', |
75 | 'locale' => 'en_GB', |
76 | ) |
77 | ); |
78 | |
79 | /** |
80 | * config preferences |
81 | */ |
82 | const CONFIG_SECURE_TOKEN = ZMS_CONFIG_SECURE_TOKEN; |
83 | |
84 | /** |
85 | * signature key for url signature to save query paramter with hash |
86 | */ |
87 | public static $urlSignatureSecret = ZMS_CONFIG_SECURE_TOKEN; |
88 | |
89 | /** |
90 | * ----------------------------------------------------------------------- |
91 | * ZMS API access |
92 | * @var Http $http |
93 | */ |
94 | public static $http = null; |
95 | |
96 | public static $http_curl_config = array(); |
97 | |
98 | const CLIENTKEY = ''; |
99 | |
100 | const JSON_COMPRESS_LEVEL = 1; |
101 | |
102 | /** |
103 | * HTTP url for api |
104 | */ |
105 | const HTTP_BASE_URL = 'http://user:pass@host.tdl'; |
106 | } |