Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 8
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
3namespace BO\Slim;
4
5define(
6    'ZMS_SESSION_DURATION',
7    (($value = getenv('ZMS_SESSION_DURATION')) !== false && $value !== '') ? $value : 36000
8);
9if (!defined('ZMS_SLIM_TWIG_CACHE')) {
10    $value = getenv('ZMS_SLIM_TWIG_CACHE');
11    define('ZMS_SLIM_TWIG_CACHE', ($value === 'false') ? false : ($value ?: false));
12}
13define('ZMS_DEBUGLEVEL', getenv('DEBUGLEVEL') ? getenv('DEBUGLEVEL') : 'INFO');
14
15class Application
16{
17    /**
18     * Root directory for the project
19     */
20    public const string APP_PATH = '.';
21
22    /**
23     * Name of the application
24     */
25    public const string IDENTIFIER = 'unnamed slim project';
26
27    public const string MODULE_NAME = 'unnamed slim module';
28
29    /**
30     * Flag to enable debugging mode for application,
31     * if debug is enabled, an exception is shown with a backtrace
32     */
33    public const bool DEBUG = false;
34    const string DEBUGLEVEL = ZMS_DEBUGLEVEL;
35    const SESSION_DURATION = ZMS_SESSION_DURATION;
36    const string SECURE_TOKEN = '';
37    const string CONFIG_SECURE_TOKEN = '';
38    const bool RIGHTSCHECK_ENABLED = true;
39    const int JSON_COMPRESS_LEVEL = 1;
40    const string HTTP_BASE_URL = '';
41    const string CLIENTKEY = '';
42    const bool MAINTENANCE_MODE_ENABLED = false;
43    const string ZMS_CITIZENLOGIN_EXTERNALUSERID_CLAIM_NAME = '';
44    const bool LOG_ERRORS = true;
45    const bool LOG_DETAILS = true;
46/**
47     * Settings for region
48     */
49    const string CHARSET = 'UTF-8';
50    const string TIMEZONE = 'Europe/Berlin';
51    public static $includeUrl = null;
52/*
53     * -----------------------------------------------------------------------
54     * current time
55     */
56
57    public static $now;
58/*
59     * -----------------------------------------------------------------------
60     * Slim
61     */
62
63    /**
64     * Slim singleton instance
65     *
66     * @var \BO\Slim\SlimApp $slim
67     */
68    public static $slim;
69/**
70     * Define the path for the templates relative to APP_PATH
71     */
72    const string TEMPLATE_PATH = '/templates/';
73/**
74     * Define path for Twig template cache
75     */
76    const TWIG_CACHE = false;
77/**
78     * Set this option, if ESI should be used
79     */
80    const bool ESI_ENABLED = true;
81/**
82     * translator class
83     */
84    const string TRANSLATOR_CLASS = '\\Symfony\\Component\\Translation\\Translator';
85/**
86     * Default parameters for templates
87     *
88     */
89    public static $templatedefaults = array();
90/**
91     * Default parameters for middleware HttpBasicAuth
92     *
93     */
94    public static $httpBasicAuth = array();
95/*
96     * -----------------------------------------------------------------------
97     * Logging PSR3 compatible
98     */
99    public static $log = null;
100/**
101     * image preferences
102     */
103
104    public static $isImageAllowed = true;
105/**
106     * @var \BO\Slim\Language $language
107     *
108     */
109    const bool MULTILANGUAGE = true;
110    public static $languagesource = 'json';
111    public static $language = null;
112    public static $supportedLanguages = array(
113        // Default language
114        'de' => array(
115            'name'    => 'Deutsch',
116            'locale'  => 'de_DE.utf-8',
117            'default' => true,
118        ),
119        'en' => array(
120            'name'    => 'English',
121            'locale'  => 'en_GB.utf-8',
122            'default' => false,
123        )
124    );
125// default overwritten with Bootstrap::init()
126    public static $urlSignatureSecret = 'e8dd240a854185c740384d90d771d85c';
127}