-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStreamApiService.php
51 lines (44 loc) · 1.77 KB
/
StreamApiService.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
<?php
require_once 'StreamService.php';
require_once 'services/CyberGameTv.php';
require_once 'services/HashdTv.php';
require_once 'services/JustinTv.php';
require_once 'services/TwitchTv.php';
require_once 'services/Livestream.php';
require_once 'services/UstreamTv.php';
require_once 'services/MotionCreds.php';
require_once 'services/GoodGame.php';
require_once 'services/YouTube.php';
require_once 'services/YaTv.php';
class StreamApiService {
const SERVICE_LIVESTREAM = 'Livestream';
const SERVICE_CYBERGAMETV = 'Cybergame';
const SERVICE_JUSTINTV = 'Justin.tv';
const SERVICE_TWITCHTV = 'TwitchTv';
const SERVICE_YATV = 'YaTV';
const SERVICE_HASHDTV = 'HashdTv';
const SERVICE_USTREAMTV = 'UstreamTv';
const SERVICE_MOTIONCREDS = 'MotionCreds';
const SERVICE_GOODGAME = 'GoodGame';
const SERVICE_YOUTUBE = 'YouTube';
public $services = array();
private function __construct() {
$this->services[self::SERVICE_LIVESTREAM] = new Livestream();
$this->services[self::SERVICE_JUSTINTV] = new JustinTv();
$this->services[self::SERVICE_TWITCHTV] = new TwitchTv();
$this->services[self::SERVICE_GOODGAME] = new GoodGame();
$this->services[self::SERVICE_HASHDTV] = new HashdTv();
$this->services[self::SERVICE_MOTIONCREDS] = new MotionCreds();
$this->services[self::SERVICE_USTREAMTV] = new UstreamTv();
$this->services[self::SERVICE_YATV] = new YaTv();
$this->services[self::SERVICE_CYBERGAMETV] = new CyberGameTv();
$this->services[self::SERVICE_YOUTUBE] = new YouTube();
}
public static function getInstance() {
static $instance = null;
if ($instance === null) {
$instance = new StreamApiService();
}
return $instance;
}
}