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