-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStreamService.php
41 lines (33 loc) · 1.03 KB
/
StreamService.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
<?php
abstract class StreamService {
/**
* @param Array $channel
* @return Array or null if channel isn't exist
*/
abstract public function checkChannel($channel);
/**
* Get stream information in batch request
* @param Array $channels
* @return Array
*/
abstract public function getInfo($channels);
/**
* Get stream thumbnail
* @param Array $channel channels information
* @return String with thumbnail url or null if thumbnail can be obtain only by getInfo method
*/
abstract public function getThumbnail($channel);
//TODO
public function getVideos($userName, $userId, $lastVideoId = -1) {
return null;
}
abstract public function getEmbedPlayerCode($channel, $width, $height);
public function renderTemplate($template, $data) {
ob_start();
extract($data);
require('services/templates/' . $template . '.tpl.php');
$contents = ob_get_contents();
ob_end_clean();
return $contents;
}
}