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 DEBUGLEVEL = ZMS_DEBUGLEVEL;
35    const SESSION_DURATION = ZMS_SESSION_DURATION;
36    const LOG_ERRORS = true;
37    const LOG_DETAILS = true;
38/**
39     * Settings for region
40     */
41    const CHARSET = 'UTF-8';
42    const TIMEZONE = 'Europe/Berlin';
43    public static $includeUrl = null;
44/*
45     * -----------------------------------------------------------------------
46     * current time
47     */
48
49    public static $now;
50/*
51     * -----------------------------------------------------------------------
52     * Slim
53     */
54
55    /**
56     * Slim singleton instance
57     *
58     * @var \BO\Slim\SlimApp $slim
59     */
60    public static $slim;
61/**
62     * Define the path for the templates relative to APP_PATH
63     */
64    const TEMPLATE_PATH = '/templates/';
65/**
66     * Define path for Twig template cache
67     */
68    const TWIG_CACHE = false;
69/**
70     * Set this option, if ESI should be used
71     */
72    const ESI_ENABLED = true;
73/**
74     * translator class
75     */
76    const TRANSLATOR_CLASS = '\\Symfony\\Component\\Translation\\Translator';
77/**
78     * Default parameters for templates
79     *
80     */
81    public static $templatedefaults = array();
82/**
83     * Default parameters for middleware HttpBasicAuth
84     *
85     */
86    public static $httpBasicAuth = array();
87/*
88     * -----------------------------------------------------------------------
89     * Logging PSR3 compatible
90     */
91    public static $log = null;
92/**
93     * image preferences
94     */
95
96    public static $isImageAllowed = true;
97/**
98     * @var \BO\Slim\Language $language
99     *
100     */
101    const MULTILANGUAGE = true;
102    public static $languagesource = 'json';
103    public static $language = null;
104    public static $supportedLanguages = array(
105        // Default language
106        'de' => array(
107            'name'    => 'Deutsch',
108            'locale'  => 'de_DE.utf-8',
109            'default' => true,
110        ),
111        'en' => array(
112            'name'    => 'English',
113            'locale'  => 'en_GB.utf-8',
114            'default' => false,
115        )
116    );
117// default overwritten with Bootstrap::init()
118    public static $urlSignatureSecret = 'e8dd240a854185c740384d90d771d85c';
119}