Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
Application
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
1 / 1
 getNow
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
2
1<?php
2
3/**
4 * @package 115Mandant
5 * @copyright BerlinOnline Stadtportal GmbH & Co. KG
6 **/
7
8namespace BO\Zmsapi;
9
10class Application extends \BO\Slim\Application
11{
12    /**
13     * Name of the application
14     */
15    const IDENTIFIER = 'zms';
16
17    const MODULE_NAME = 'zmsapi';
18
19    /**
20     * @var Bool DEBUG
21     */
22    const DEBUG = false;
23
24    /**
25     * @var Bool DB_ENABLE_WSREPSYNCWAIT
26     */
27    const DB_ENABLE_WSREPSYNCWAIT = false;
28
29    /**
30     * @var Bool RIGHTSCHECK_ENABLED
31     */
32    const RIGHTSCHECK_ENABLED = true;
33
34    /**
35     * @var String DB_DSN_READONLY
36     */
37    const DB_DSN_READONLY = 'mysql:dbname=zmsbo;host=127.0.0.1';
38
39    /**
40     * @var String DB_DSN_READWRITE
41     */
42    const DB_DSN_READWRITE = 'mysql:dbname=zmsbo;host=127.0.0.1';
43
44    /**
45     * temporary db name for using dldb data
46     * @var String DB_STARTINFO
47     */
48    const DB_STARTINFO = 'startinfo';
49
50    /**
51     * @var String DB_USERNAME
52     */
53    const DB_USERNAME = 'server';
54
55    /**
56     * @var String DB_PASSWORD
57     */
58    const DB_PASSWORD = 'internet';
59
60    /**
61     * @var String DB_IS_GALERA
62     */
63    const DB_IS_GALERA = true;
64
65    /**
66     * @var String Security Token for Api Access -> get config for example
67     */
68    const SECURE_TOKEN = 'a9b215f1-e460-490c-8a0b-6d42c274d5e4';
69
70    /**
71     * language preferences
72     */
73
74    public static $locale = 'de';
75
76    public static $supportedLanguages = array(
77        // Default language
78        'de' => array(
79            'name'    => 'Deutsch',
80            'locale'  => 'de_DE.utf-8',
81            'default' => true,
82        )
83    );
84
85    /**
86     * dldb data path
87     */
88    public static $data = '/data';
89
90    /**
91     * @var \DateTimeInterface $now time to use for today (testing)
92     */
93    public static $now = null;
94
95    public static function getNow()
96    {
97        if (self::$now instanceof \DateTimeInterface) {
98            return self::$now;
99        }
100        return new \DateTimeImmutable();
101    }
102}