Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
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 | |
| 10 | namespace BO\Zmsticketprinter; |
| 11 | |
| 12 | if (($token = getenv('ZMS_CONFIG_SECURE_TOKEN')) === false || $token === '') { |
| 13 | throw new \RuntimeException('ZMS_CONFIG_SECURE_TOKEN environment variable must be set'); |
| 14 | } |
| 15 | |
| 16 | define('ZMS_CONFIG_SECURE_TOKEN', getenv('ZMS_CONFIG_SECURE_TOKEN')); |
| 17 | |
| 18 | if (!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 | |
| 23 | class 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 | public static $supportedLanguages = array( |
| 41 | // Default language |
| 42 | 'de' => array( |
| 43 | 'name' => 'Deutsch', |
| 44 | 'locale' => 'de_DE.utf-8', |
| 45 | 'default' => true, |
| 46 | ), |
| 47 | 'en' => array( |
| 48 | 'name' => 'English', |
| 49 | 'locale' => 'en_GB.utf-8', |
| 50 | 'default' => false, |
| 51 | ) |
| 52 | ); |
| 53 | |
| 54 | public static $now = ''; |
| 55 | |
| 56 | /* |
| 57 | * ----------------------------------------------------------------------- |
| 58 | * ZMS API access |
| 59 | */ |
| 60 | |
| 61 | public static $http = null; |
| 62 | |
| 63 | public static $http_curl_config = array(); |
| 64 | |
| 65 | public const JSON_COMPRESS_LEVEL = 1; |
| 66 | |
| 67 | /** |
| 68 | * HTTP url for api |
| 69 | */ |
| 70 | public const HTTP_BASE_URL = 'http://user:pass@host.tdl'; |
| 71 | public const SECURE_TOKEN = ZMS_CONFIG_SECURE_TOKEN; |
| 72 | |
| 73 | public const CLIENTKEY = ''; |
| 74 | } |