-
Notifications
You must be signed in to change notification settings - Fork 7
/
station.php
54 lines (46 loc) · 1015 Bytes
/
station.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
<?php
/*
* Playlist generator
*
* @version 2015-08-30
* @author François LASSERRE <[email protected]>
* @license GNU GPL {@link http://www.gnu.org/licenses/gpl.html}
*/
class Station
{
private $name = '';
private $description = '';
private $url = '';
private $servers = [];
public function __construct($name, $description, $url)
{
$this->name = $name;
$this->description = $description;
$this->url = $url;
}
public function addServer($server)
{
if (is_string($server)) {
$this->servers[] = $server;
}
if (is_array($server)) {
$this->servers = array_merge($this->servers, $server);
}
}
public function getName()
{
return $this->name;
}
public function getDescription()
{
return $this->description;
}
public function getUrl()
{
return $this->url;
}
public function getServers()
{
return $this->servers;
}
}