-
Notifications
You must be signed in to change notification settings - Fork 15
/
bootstrap.php
24 lines (19 loc) · 886 Bytes
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
define('APP_DIR', __DIR__);
// Pull in all existing application dependencies
require_once(APP_DIR . '/vendor/autoload.php');
require_once(APP_DIR . '/lib/CalculatorApp.php');
require_once(APP_DIR . '/lib/Config.php');
require_once(APP_DIR . '/lib/adaptors/AbeAdaptor.php');
require_once(APP_DIR . '/lib/adaptors/RpcAdaptor.php');
define('CONFIG_DIR', APP_DIR . '/config');
$config = \n00bsys0p\Config::parse(CONFIG_DIR);
define('CACHE_DIR', APP_DIR . '/' . $config['cache']['dir']);
define('CACHE_EXCHANGE_TIMEOUT', $config['cache']['exchange_timeout']);
define('CACHE_FIAT_TIMEOUT', $config['cache']['fiat_timeout']);
define('CACHE_BLOCK_TIMEOUT', $config['cache']['block_timeout']);
define('GET_PARAM_HASHRATE', 'hr');
define('GET_PARAM_MULTIPLIER', 'hx');
define('GET_PARAM_WATTAGE', 'w');
define('GET_PARAM_PERKWH', 'perkwh');
define('GET_PARAM_COSTCURRENCY', 'kwhfiat');