1 | <?php |
||
72 | class CircleService { |
||
73 | |||
74 | |||
75 | use TArrayTools; |
||
76 | use TStringTools; |
||
77 | |||
78 | |||
79 | /** @var CircleRequest */ |
||
80 | private $circleRequest; |
||
81 | |||
82 | /** @var MemberRequest */ |
||
83 | private $memberRequest; |
||
84 | |||
85 | /** @var RemoteStreamService */ |
||
86 | private $remoteStreamService; |
||
87 | |||
88 | /** @var FederatedUserService */ |
||
89 | private $federatedUserService; |
||
90 | |||
91 | /** @var FederatedEventService */ |
||
92 | private $federatedEventService; |
||
93 | |||
94 | /** @var MemberService */ |
||
95 | private $memberService; |
||
96 | |||
97 | /** @var ConfigService */ |
||
98 | private $configService; |
||
99 | |||
100 | |||
101 | /** |
||
102 | * CircleService constructor. |
||
103 | * |
||
104 | * @param CircleRequest $circleRequest |
||
105 | * @param MemberRequest $memberRequest |
||
106 | * @param RemoteStreamService $remoteStreamService |
||
107 | * @param FederatedUserService $federatedUserService |
||
108 | * @param FederatedEventService $federatedEventService |
||
109 | * @param MemberService $memberService |
||
110 | * @param ConfigService $configService |
||
111 | */ |
||
112 | public function __construct( |
||
125 | |||
126 | |||
127 | /** |
||
128 | * @param string $name |
||
129 | * @param FederatedUser|null $owner |
||
130 | * @param bool $personal |
||
131 | * @param bool $local |
||
132 | * |
||
133 | * @return array |
||
134 | * @throws FederatedEventException |
||
135 | * @throws FederatedItemException |
||
136 | * @throws InitiatorNotConfirmedException |
||
137 | * @throws InitiatorNotFoundException |
||
138 | * @throws OwnerNotFoundException |
||
139 | * @throws RemoteInstanceException |
||
140 | * @throws RemoteNotFoundException |
||
141 | * @throws RemoteResourceNotFoundException |
||
142 | * @throws UnknownRemoteException |
||
143 | * @throws RequestBuilderException |
||
144 | */ |
||
145 | public function create( |
||
192 | |||
193 | |||
194 | /** |
||
195 | * @param string $circleId |
||
196 | * |
||
197 | * @return array |
||
198 | * @throws CircleNotFoundException |
||
199 | * @throws FederatedEventException |
||
200 | * @throws FederatedItemException |
||
201 | * @throws InitiatorNotConfirmedException |
||
202 | * @throws InitiatorNotFoundException |
||
203 | * @throws OwnerNotFoundException |
||
204 | * @throws RemoteInstanceException |
||
205 | * @throws RemoteNotFoundException |
||
206 | * @throws RemoteResourceNotFoundException |
||
207 | * @throws RequestBuilderException |
||
208 | * @throws UnknownRemoteException |
||
209 | */ |
||
210 | public function destroy(string $circleId): array { |
||
221 | |||
222 | |||
223 | /** |
||
224 | * @param string $circleId |
||
225 | * @param int $config |
||
226 | * |
||
227 | * @return array |
||
228 | * @throws CircleNotFoundException |
||
229 | * @throws FederatedEventException |
||
230 | * @throws FederatedItemException |
||
231 | * @throws InitiatorNotConfirmedException |
||
232 | * @throws InitiatorNotFoundException |
||
233 | * @throws OwnerNotFoundException |
||
234 | * @throws RemoteInstanceException |
||
235 | * @throws RemoteNotFoundException |
||
236 | * @throws RemoteResourceNotFoundException |
||
237 | * @throws UnknownRemoteException |
||
238 | * @throws RequestBuilderException |
||
239 | */ |
||
240 | public function updateConfig(string $circleId, int $config): array { |
||
251 | |||
252 | |||
253 | /** |
||
254 | * @param string $circleId |
||
255 | * @param string $displayName |
||
256 | * |
||
257 | * @return array |
||
258 | * @throws CircleNotFoundException |
||
259 | * @throws FederatedEventException |
||
260 | * @throws FederatedItemException |
||
261 | * @throws InitiatorNotConfirmedException |
||
262 | * @throws InitiatorNotFoundException |
||
263 | * @throws OwnerNotFoundException |
||
264 | * @throws RemoteInstanceException |
||
265 | * @throws RemoteNotFoundException |
||
266 | * @throws RemoteResourceNotFoundException |
||
267 | * @throws RequestBuilderException |
||
268 | * @throws UnknownRemoteException |
||
269 | */ |
||
270 | public function updateDisplayName(string $circleId, string $displayName): array { |
||
281 | |||
282 | /** |
||
283 | * @param string $circleId |
||
284 | * @param string $description |
||
285 | * |
||
286 | * @return array |
||
287 | * @throws CircleNotFoundException |
||
288 | * @throws FederatedEventException |
||
289 | * @throws FederatedItemException |
||
290 | * @throws InitiatorNotConfirmedException |
||
291 | * @throws InitiatorNotFoundException |
||
292 | * @throws OwnerNotFoundException |
||
293 | * @throws RemoteInstanceException |
||
294 | * @throws RemoteNotFoundException |
||
295 | * @throws RemoteResourceNotFoundException |
||
296 | * @throws RequestBuilderException |
||
297 | * @throws UnknownRemoteException |
||
298 | */ |
||
299 | public function updateDescription(string $circleId, string $description): array { |
||
310 | |||
311 | /** |
||
312 | * @param string $circleId |
||
313 | * @param array $settings |
||
314 | * |
||
315 | * @return array |
||
316 | * @throws CircleNotFoundException |
||
317 | * @throws FederatedEventException |
||
318 | * @throws FederatedItemException |
||
319 | * @throws InitiatorNotConfirmedException |
||
320 | * @throws InitiatorNotFoundException |
||
321 | * @throws OwnerNotFoundException |
||
322 | * @throws RemoteInstanceException |
||
323 | * @throws RemoteNotFoundException |
||
324 | * @throws RemoteResourceNotFoundException |
||
325 | * @throws RequestBuilderException |
||
326 | * @throws UnknownRemoteException |
||
327 | */ |
||
328 | public function updateSettings(string $circleId, array $settings) { |
||
339 | |||
340 | |||
341 | /** |
||
342 | * @param string $circleId |
||
343 | * |
||
344 | * @return array |
||
345 | * @throws CircleNotFoundException |
||
346 | * @throws FederatedEventException |
||
347 | * @throws FederatedItemException |
||
348 | * @throws InitiatorNotConfirmedException |
||
349 | * @throws InitiatorNotFoundException |
||
350 | * @throws OwnerNotFoundException |
||
351 | * @throws RemoteInstanceException |
||
352 | * @throws RemoteNotFoundException |
||
353 | * @throws RemoteResourceNotFoundException |
||
354 | * @throws UnknownRemoteException |
||
355 | * @throws RequestBuilderException |
||
356 | */ |
||
357 | public function circleJoin(string $circleId): array { |
||
369 | |||
370 | |||
371 | /** |
||
372 | * @param string $circleId |
||
373 | * |
||
374 | * @return array |
||
375 | * @throws CircleNotFoundException |
||
376 | * @throws FederatedEventException |
||
377 | * @throws FederatedItemException |
||
378 | * @throws InitiatorNotConfirmedException |
||
379 | * @throws InitiatorNotFoundException |
||
380 | * @throws OwnerNotFoundException |
||
381 | * @throws RemoteInstanceException |
||
382 | * @throws RemoteNotFoundException |
||
383 | * @throws RemoteResourceNotFoundException |
||
384 | * @throws UnknownRemoteException |
||
385 | */ |
||
386 | public function circleLeave(string $circleId): array { |
||
398 | |||
399 | |||
400 | /** |
||
401 | * @param string $circleId |
||
402 | * @param int $filter |
||
403 | * |
||
404 | * @return Circle |
||
405 | * @throws CircleNotFoundException |
||
406 | * @throws InitiatorNotFoundException |
||
407 | * @throws RequestBuilderException |
||
408 | */ |
||
409 | public function getCircle( |
||
422 | |||
423 | |||
424 | /** |
||
425 | * @param Circle|null $circleFilter |
||
426 | * @param Member|null $memberFilter |
||
427 | * @param SimpleDataStore|null $params |
||
428 | * |
||
429 | * @return Circle[] |
||
430 | * @throws InitiatorNotFoundException |
||
431 | * @throws RequestBuilderException |
||
432 | */ |
||
433 | public function getCircles( |
||
463 | |||
464 | |||
465 | /** |
||
466 | * @param Circle $circle |
||
467 | * |
||
468 | * @throws MembersLimitException |
||
469 | */ |
||
470 | public function confirmCircleNotFull(Circle $circle): void { |
||
475 | |||
476 | |||
477 | /** |
||
478 | * @param Circle $circle |
||
479 | * |
||
480 | * @return bool |
||
481 | */ |
||
482 | public function isCircleFull(Circle $circle): bool { |
||
497 | |||
498 | } |
||
499 | |||
500 |
This check looks for access to properties that are not accessible from the current context.
If you need to make a property accessible to another context you can either raise its visibility level or provide an accessible getter in the defining class.