Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 10 |
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 | * @package Zmsstatistic |
5 | * @copyright BerlinOnline Stadtportal GmbH & Co. KG |
6 | **/ |
7 | |
8 | namespace BO\Zmsstatistic; |
9 | |
10 | use BO\Zmsclient\Http; |
11 | |
12 | define( |
13 | 'ZMS_STATISTIC_SESSION_DURATION', |
14 | getenv('ZMS_STATISTIC_SESSION_DURATION') ? getenv('ZMS_STATISTIC_SESSION_DURATION') : 28800 |
15 | ); |
16 | |
17 | if (($token = getenv('ZMS_CONFIG_SECURE_TOKEN')) === false || $token === '') { |
18 | throw new \RuntimeException('ZMS_CONFIG_SECURE_TOKEN environment variable must be set'); |
19 | } |
20 | |
21 | define('ZMS_CONFIG_SECURE_TOKEN', getenv('ZMS_CONFIG_SECURE_TOKEN')); |
22 | |
23 | if (!defined('ZMS_STATISTIC_TWIG_CACHE')) { |
24 | $value = getenv('ZMS_STATISTIC_TWIG_CACHE'); |
25 | define('ZMS_STATISTIC_TWIG_CACHE', ($value === 'false') ? false : ($value ?: '/cache/')); |
26 | } |
27 | |
28 | class Application extends \BO\Slim\Application |
29 | { |
30 | /** |
31 | * Name of the application |
32 | * |
33 | */ |
34 | const IDENTIFIER = 'zms'; |
35 | |
36 | const MODULE_NAME = 'zmsstatistic'; |
37 | |
38 | const DEBUG = false; |
39 | |
40 | const TWIG_CACHE = ZMS_STATISTIC_TWIG_CACHE; |
41 | |
42 | const SESSION_DURATION = ZMS_STATISTIC_SESSION_DURATION; |
43 | |
44 | public static $includeUrl = '/terminvereinbarung/statistic'; |
45 | /** |
46 | * language preferences |
47 | */ |
48 | public static $locale = 'de'; |
49 | public static $supportedLanguages = array( |
50 | // Default language |
51 | 'de' => array( |
52 | 'name' => 'Deutsch', |
53 | 'locale' => 'de_DE', |
54 | 'default' => true, |
55 | ), |
56 | // Other languages |
57 | 'en' => array( |
58 | 'name' => 'English', |
59 | 'locale' => 'en_GB', |
60 | ) |
61 | ); |
62 | |
63 | /** |
64 | * image preferences |
65 | */ |
66 | |
67 | public static $isImageAllowed = false; |
68 | |
69 | /* |
70 | * ----------------------------------------------------------------------- |
71 | * ZMS API access |
72 | */ |
73 | public static $http = null; |
74 | |
75 | public static $http_curl_config = array(); |
76 | |
77 | const JSON_COMPRESS_LEVEL = 1; |
78 | |
79 | /** |
80 | * config preferences |
81 | */ |
82 | const CONFIG_SECURE_TOKEN = ZMS_CONFIG_SECURE_TOKEN; |
83 | |
84 | /** |
85 | * HTTP url for api |
86 | */ |
87 | const HTTP_BASE_URL = 'http://user:pass@host.tdl'; |
88 | } |