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