Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 6
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/**
4 *
5 * @package Zmsticketprinter
6 * @copyright BerlinOnline Stadtportal GmbH & Co. KG
7 *
8 */
9
10namespace BO\Zmsticketprinter;
11
12if (($token = getenv('ZMS_CONFIG_SECURE_TOKEN')) === false || $token === '') {
13    throw new \RuntimeException('ZMS_CONFIG_SECURE_TOKEN environment variable must be set');
14}
15
16define('ZMS_CONFIG_SECURE_TOKEN', getenv('ZMS_CONFIG_SECURE_TOKEN'));
17
18if (!defined('ZMS_TICKETPRINTER_TWIG_CACHE')) {
19    $value = getenv('ZMS_TICKETPRINTER_TWIG_CACHE');
20    define('ZMS_TICKETPRINTER_TWIG_CACHE', ($value === 'false') ? false : ($value ?: '/cache/'));
21}
22
23class Application extends \BO\Slim\Application
24{
25    /**
26     * Name of the application
27     */
28    const IDENTIFIER = 'zms';
29
30    const MODULE_NAME = 'zmsticketprinter';
31
32    public const DEBUG = false;
33    const TWIG_CACHE = ZMS_TICKETPRINTER_TWIG_CACHE;
34
35    /**
36     * language preferences
37     */
38    public static $locale = 'de';
39
40    /**
41     * Base path for static assets (_css, _js). Must match routing and js/settings.js.
42     */
43    public static $includeUrl = '/terminvereinbarung/ticketprinter';
44
45    public static $supportedLanguages = array(
46        // Default language
47        'de' => array(
48            'name' => 'Deutsch',
49            'locale' => 'de_DE.utf-8',
50            'default' => true,
51        ),
52        'en' => array(
53            'name' => 'English',
54            'locale' => 'en_GB.utf-8',
55            'default' => false,
56        )
57    );
58
59    public static $now = '';
60
61    /*
62     * -----------------------------------------------------------------------
63     * ZMS API access
64     */
65
66    public static $http = null;
67
68    public static $http_curl_config = array();
69
70    public const JSON_COMPRESS_LEVEL = 1;
71
72    /**
73     * HTTP url for api
74     */
75    public const HTTP_BASE_URL = 'http://user:pass@host.tdl';
76    public const SECURE_TOKEN = ZMS_CONFIG_SECURE_TOKEN;
77
78    public const CLIENTKEY = '';
79}