Lines 0.00% 0 / 2
Methods 0.00% 0 / 1
Classes 0.00% 0 / 1
Name Lines Methods CRAP
 initialize 0.00% 0 / 2 0.00% 0 / 1 2
26class Application extends \BO\Slim\Application
27{
28    /**
29     * Name of the application
30     */
31    const string IDENTIFIER = 'zms';
32    const string MODULE_NAME = 'zmscalldisplay';
33
34    public static ?CacheInterface $cache = null;
35
36    const bool DEBUG = false;
37    const TWIG_CACHE = ZMS_CALLDISPLAY_TWIG_CACHE;
38
39    /**
40     * language preferences
41     */
42    public static $locale = 'de';
43
44    /**
45     * Base path for static assets (_css, _js). Must match routing and js/settings.js.
46     */
47    public static ?string $includeUrl = '/terminvereinbarung/calldisplay';
48
49    public static array $supportedLanguages = array(
50        // Default language
51        'de' => array(
52            'name'    => 'Deutsch',
53            'locale'  => 'de_DE.utf-8',
54            'default' => true,
55        ),
56        'en' => array(
57            'name'    => 'English',
58            'locale'  => 'en_GB.utf-8',
59            'default' => false,
60        )
61    );
62
63    public static ?\DateTimeInterface $now = null;
64
65    /*
66     * -----------------------------------------------------------------------
67     * ZMS API access
68     */
69
70    public static $http = null;
71
72    public static $http_curl_config = array();
73
74    const int JSON_COMPRESS_LEVEL = 1;
75
76    /**
77     * HTTP url for api
78     */
79    const string HTTP_BASE_URL = 'http://user:pass@host.tdl';
80    const string SECURE_TOKEN = ZMS_CONFIG_SECURE_TOKEN;
81
82     /**
83     * signature key for url signature to save query paramter with hash
84     */
85    public static string $urlSignatureSecret = ZMS_CONFIG_SECURE_TOKEN;
86
87    public static function initialize(): void
88    {
89        ModuleLoggerInitializer::configure('ZMS_CALLDISPLAY');
90        self::$cache = ModuleLoggerInitializer::tryInitializeCache();
91    }
92}