-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathConfiguration.php
More file actions
69 lines (51 loc) · 1.59 KB
/
Copy pathConfiguration.php
File metadata and controls
69 lines (51 loc) · 1.59 KB
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
66
67
68
69
<?php
class Configuration extends ObjectYPT {
protected $allowedStreamersURL, $defaultPriority, $version, $autodelete;
static function getSearchFieldsNames() {
return array('allowedStreamersURL');
}
static function getTableName() {
return 'configurations';
}
function __construct() {
$this->load(1);
}
function getAllowedStreamersURL() {
return $this->allowedStreamersURL;
}
function getDefaultPriority() {
return $this->defaultPriority;
}
function setAllowedStreamersURL($allowedStreamersURL) {
$this->allowedStreamersURL = $allowedStreamersURL;
}
function setDefaultPriority($defaultPriority) {
$this->defaultPriority = $defaultPriority;
}
function getVersion() {
return $this->version;
}
function setVersion($version) {
$this->version = $version;
}
function getAutodelete() {
return $this->autodelete;
}
function setAutodelete($autodelete) {
if(empty($autodelete) || strtolower($autodelete) === 'false'){
$autodelete = 0;
}else{
$autodelete = 1;
}
$this->autodelete = $autodelete;
}
function currentVersionLowerThen($version) {
return version_compare($version, $this->getVersion()) > 0;
}
function currentVersionGreaterThen($version) {
return version_compare($version, $this->getVersion()) < 0;
}
function currentVersionEqual($version) {
return version_compare($version, $this->getVersion()) == 0;
}
}