forked from gentlecat/steam-locomotive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocomotive.php
65 lines (54 loc) · 2.26 KB
/
locomotive.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
define('LOCOMOTIVE_PATH', dirname(__FILE__) . '/');
define('LOCOMOTIVE_CORE_PATH', LOCOMOTIVE_PATH . 'core/');
// Importing interfaces
require LOCOMOTIVE_CORE_PATH . 'web_interface.php';
define('LOCOMOTIVE_INTERFACES_PATH', LOCOMOTIVE_CORE_PATH . 'interfaces/');
foreach (glob(LOCOMOTIVE_INTERFACES_PATH . '*.php') as $filename) {
require $filename;
}
// Importing tools
require LOCOMOTIVE_CORE_PATH . 'tool.php';
define('LOCOMOTIVE_TOOLS_PATH', LOCOMOTIVE_CORE_PATH . 'tools/');
foreach (glob(LOCOMOTIVE_TOOLS_PATH . '*.php') as $filename) {
require $filename;
}
/**
* Main class
*/
class Locomotive
{
/**
* @param string $api_key Steam API key from http://steamcommunity.com/dev/apikey/
*/
function __construct($api_key)
{
$GLOBALS['api_key'] = $api_key;
// Defining interfaces
$this->IDOTA2Match_570 = new \Locomotive\WebInterfaces\IDOTA2Match_570();
$this->IDOTA2Match_816 = new \Locomotive\WebInterfaces\IDOTA2Match_816();
$this->IDOTA2Match_205790 = new \Locomotive\WebInterfaces\IDOTA2Match_205790();
$this->IEconDOTA2_570 = new \Locomotive\WebInterfaces\IEconDOTA2_570();
$this->IEconDOTA2_816 = new \Locomotive\WebInterfaces\IEconDOTA2_816();
$this->IEconDOTA2_205790 = new \Locomotive\WebInterfaces\IEconDOTA2_205790();
$this->IPlayerService = new \Locomotive\WebInterfaces\IPlayerService();
$this->ISteamApps = new \Locomotive\WebInterfaces\ISteamApps();
$this->ISteamGameServerAccount = new \Locomotive\WebInterfaces\ISteamGameServerAccount();
$this->ISteamRemoteStorage = new \Locomotive\WebInterfaces\ISteamRemoteStorage();
$this->ISteamUser = new \Locomotive\WebInterfaces\ISteamUser();
$this->ISteamUserStats = new \Locomotive\WebInterfaces\ISteamUserStats();
$this->ISteamWebAPIUtil = new \Locomotive\WebInterfaces\ISteamWebAPIUtil();
$this->tools = new LocomotiveTools();
}
}
class LocomotiveTools
{
public function __construct()
{
// Defining tools
$this->store = new \Locomotive\Tools\Store();
$this->dota = new \Locomotive\Tools\Dota();
$this->user = new \Locomotive\Tools\User();
$this->app = new \Locomotive\Tools\App(); // TODO: Remove (see store tools)
}
}