|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Circles - Bring cloud-users closer together. |
|
4
|
|
|
* |
|
5
|
|
|
* This file is licensed under the Affero General Public License version 3 or |
|
6
|
|
|
* later. See the COPYING file. |
|
7
|
|
|
* |
|
8
|
|
|
* @author Maxence Lange <[email protected]> |
|
9
|
|
|
* @copyright 2017 |
|
10
|
|
|
* @license GNU AGPL version 3 or any later version |
|
11
|
|
|
* |
|
12
|
|
|
* This program is free software: you can redistribute it and/or modify |
|
13
|
|
|
* it under the terms of the GNU Affero General Public License as |
|
14
|
|
|
* published by the Free Software Foundation, either version 3 of the |
|
15
|
|
|
* License, or (at your option) any later version. |
|
16
|
|
|
* |
|
17
|
|
|
* This program is distributed in the hope that it will be useful, |
|
18
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
20
|
|
|
* GNU Affero General Public License for more details. |
|
21
|
|
|
* |
|
22
|
|
|
* You should have received a copy of the GNU Affero General Public License |
|
23
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
24
|
|
|
* |
|
25
|
|
|
*/ |
|
26
|
|
|
|
|
27
|
|
|
namespace OCA\Circles\Model; |
|
28
|
|
|
|
|
29
|
|
|
class BaseCircle { |
|
30
|
|
|
|
|
31
|
|
|
/** @var int */ |
|
32
|
|
|
private $id; |
|
33
|
|
|
|
|
34
|
|
|
/** @var string */ |
|
35
|
|
|
private $name; |
|
36
|
|
|
|
|
37
|
|
|
/** @var Member */ |
|
38
|
|
|
private $owner; |
|
39
|
|
|
|
|
40
|
|
|
/** @var Member */ |
|
41
|
|
|
private $user; |
|
42
|
|
|
|
|
43
|
|
|
/** @var string */ |
|
44
|
|
|
private $description; |
|
45
|
|
|
|
|
46
|
|
|
/** @var int */ |
|
47
|
|
|
private $type; |
|
48
|
|
|
|
|
49
|
|
|
/** @var string */ |
|
50
|
|
|
private $creation; |
|
51
|
|
|
|
|
52
|
|
|
/** @var Member[] */ |
|
53
|
|
|
private $members; |
|
54
|
|
|
|
|
55
|
|
|
/** @var string */ |
|
56
|
|
|
private $info; |
|
|
|
|
|
|
57
|
|
|
|
|
58
|
|
|
public function __construct($type = -1, $name = '') { |
|
59
|
|
|
if ($type > -1) { |
|
60
|
|
|
$this->type = $type; |
|
61
|
|
|
} |
|
62
|
|
|
if ($name !== '') { |
|
63
|
|
|
$this->name = $name; |
|
64
|
|
|
} |
|
65
|
|
|
} |
|
66
|
|
|
|
|
67
|
|
|
|
|
68
|
|
|
public function setId($id) { |
|
69
|
|
|
$this->id = $id; |
|
70
|
|
|
|
|
71
|
|
|
return $this; |
|
72
|
|
|
} |
|
73
|
|
|
|
|
74
|
|
|
public function getId() { |
|
75
|
|
|
return $this->id; |
|
76
|
|
|
} |
|
77
|
|
|
|
|
78
|
|
|
|
|
79
|
|
|
public function setName($name) { |
|
80
|
|
|
$this->name = $name; |
|
81
|
|
|
|
|
82
|
|
|
return $this; |
|
83
|
|
|
} |
|
84
|
|
|
|
|
85
|
|
|
public function getName() { |
|
86
|
|
|
return $this->name; |
|
87
|
|
|
} |
|
88
|
|
|
|
|
89
|
|
|
|
|
90
|
|
|
public function getOwner() { |
|
91
|
|
|
return $this->owner; |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
|
|
public function setOwner($owner) { |
|
95
|
|
|
$this->owner = $owner; |
|
96
|
|
|
|
|
97
|
|
|
return $this; |
|
98
|
|
|
} |
|
99
|
|
|
|
|
100
|
|
|
|
|
101
|
|
|
public function getUser() { |
|
102
|
|
|
return $this->user; |
|
103
|
|
|
} |
|
104
|
|
|
|
|
105
|
|
|
public function setUser($user) { |
|
106
|
|
|
$this->user = $user; |
|
107
|
|
|
|
|
108
|
|
|
return $this; |
|
109
|
|
|
} |
|
110
|
|
|
|
|
111
|
|
|
|
|
112
|
|
|
public function setDescription($description) { |
|
113
|
|
|
$this->description = $description; |
|
114
|
|
|
|
|
115
|
|
|
return $this; |
|
116
|
|
|
} |
|
117
|
|
|
|
|
118
|
|
|
public function getDescription() { |
|
119
|
|
|
return $this->description; |
|
120
|
|
|
} |
|
121
|
|
|
|
|
122
|
|
|
|
|
123
|
|
|
public function setType($type) { |
|
124
|
|
|
$this->type = $type; |
|
125
|
|
|
|
|
126
|
|
|
return $this; |
|
127
|
|
|
} |
|
128
|
|
|
|
|
129
|
|
|
public function getType() { |
|
130
|
|
|
return $this->type; |
|
131
|
|
|
} |
|
132
|
|
|
|
|
133
|
|
|
|
|
134
|
|
|
|
|
135
|
|
|
|
|
136
|
|
|
public function setCreation($creation) { |
|
137
|
|
|
$this->creation = $creation; |
|
138
|
|
|
|
|
139
|
|
|
return $this; |
|
140
|
|
|
} |
|
141
|
|
|
|
|
142
|
|
|
public function getCreation() { |
|
143
|
|
|
return $this->creation; |
|
144
|
|
|
} |
|
145
|
|
|
|
|
146
|
|
|
|
|
147
|
|
|
public function setMembers($members) { |
|
148
|
|
|
$this->members = $members; |
|
149
|
|
|
|
|
150
|
|
|
return $this; |
|
151
|
|
|
} |
|
152
|
|
|
|
|
153
|
|
|
public function getMembers() { |
|
154
|
|
|
return $this->members; |
|
155
|
|
|
} |
|
156
|
|
|
|
|
157
|
|
|
|
|
158
|
|
|
} |
This check marks private properties in classes that are never used. Those properties can be removed.