1 | <?php |
||
67 | class CirclesManager { |
||
68 | |||
69 | |||
70 | /** @var CirclesQueryHelper */ |
||
71 | private $circlesQueryHelper; |
||
72 | |||
73 | /** @var FederatedUserService */ |
||
74 | private $federatedUserService; |
||
75 | |||
76 | /** @var CircleService */ |
||
77 | private $circleService; |
||
78 | |||
79 | /** @var MemberService */ |
||
80 | private $memberService; |
||
81 | |||
82 | |||
83 | /** |
||
84 | * CirclesManager constructor. |
||
85 | * |
||
86 | * @param IUserSession $userSession |
||
|
|||
87 | * @param FederatedUserService $federatedUserService |
||
88 | * @param CircleService $circleService |
||
89 | * @param MemberService $memberService |
||
90 | * @param CirclesQueryHelper $circlesQueryHelper |
||
91 | */ |
||
92 | public function __construct( |
||
103 | |||
104 | |||
105 | /** |
||
106 | * @param string $federatedId |
||
107 | * @param int $type |
||
108 | * |
||
109 | * @return FederatedUser |
||
110 | * @throws CircleNotFoundException |
||
111 | * @throws FederatedItemException |
||
112 | * @throws FederatedUserException |
||
113 | * @throws FederatedUserNotFoundException |
||
114 | * @throws InvalidIdException |
||
115 | * @throws MemberNotFoundException |
||
116 | * @throws OwnerNotFoundException |
||
117 | * @throws RemoteInstanceException |
||
118 | * @throws RemoteNotFoundException |
||
119 | * @throws RemoteResourceNotFoundException |
||
120 | * @throws RequestBuilderException |
||
121 | * @throws SingleCircleNotFoundException |
||
122 | * @throws UnknownRemoteException |
||
123 | * @throws UserTypeNotFoundException |
||
124 | */ |
||
125 | public function getFederatedUser(string $federatedId, int $type = Member::TYPE_SINGLE): FederatedUser { |
||
128 | |||
129 | |||
130 | /** |
||
131 | * @throws FederatedUserNotFoundException |
||
132 | * @throws SingleCircleNotFoundException |
||
133 | * @throws RequestBuilderException |
||
134 | * @throws InvalidIdException |
||
135 | * @throws FederatedUserException |
||
136 | */ |
||
137 | public function startSession(?FederatedUser $federatedUser = null): void { |
||
144 | |||
145 | /** |
||
146 | * |
||
147 | */ |
||
148 | public function startSuperSession(): void { |
||
152 | |||
153 | |||
154 | /** |
||
155 | * $userId - userId to emulate as initiator (can be empty) |
||
156 | * $userType - specify if userIs not a singleId |
||
157 | * $circleId - if no userId specified, will use the owner of the Circle as initiator |
||
158 | * |
||
159 | * @param string $userId |
||
160 | * @param int $userType |
||
161 | * @param string $circleId |
||
162 | * |
||
163 | * @throws CircleNotFoundException |
||
164 | * @throws FederatedItemException |
||
165 | * @throws FederatedUserException |
||
166 | * @throws FederatedUserNotFoundException |
||
167 | * @throws InvalidIdException |
||
168 | * @throws MemberNotFoundException |
||
169 | * @throws OwnerNotFoundException |
||
170 | * @throws RemoteInstanceException |
||
171 | * @throws RemoteNotFoundException |
||
172 | * @throws RemoteResourceNotFoundException |
||
173 | * @throws RequestBuilderException |
||
174 | * @throws SingleCircleNotFoundException |
||
175 | * @throws UnknownRemoteException |
||
176 | * @throws UserTypeNotFoundException |
||
177 | */ |
||
178 | public function startOccSession( |
||
185 | |||
186 | |||
187 | /** |
||
188 | * |
||
189 | */ |
||
190 | public function stopSession(): void { |
||
194 | |||
195 | |||
196 | /** |
||
197 | * @return IFederatedUser |
||
198 | */ |
||
199 | public function getCurrentFederatedUser(): IFederatedUser { |
||
202 | |||
203 | |||
204 | /** |
||
205 | * @return CirclesQueryHelper |
||
206 | */ |
||
207 | public function getQueryHelper(): CirclesQueryHelper { |
||
210 | |||
211 | |||
212 | /** |
||
213 | * @param string $name |
||
214 | * @param FederatedUser|null $owner |
||
215 | * @param bool $personal |
||
216 | * @param bool $local |
||
217 | * |
||
218 | * @return Circle |
||
219 | * @throws FederatedEventException |
||
220 | * @throws InitiatorNotConfirmedException |
||
221 | * @throws FederatedItemException |
||
222 | * @throws InitiatorNotFoundException |
||
223 | * @throws InvalidItemException |
||
224 | * @throws OwnerNotFoundException |
||
225 | * @throws RemoteInstanceException |
||
226 | * @throws RemoteNotFoundException |
||
227 | * @throws RemoteResourceNotFoundException |
||
228 | * @throws RequestBuilderException |
||
229 | * @throws UnknownRemoteException |
||
230 | */ |
||
231 | public function createCircle( |
||
243 | |||
244 | |||
245 | /** |
||
246 | * @param string $singleId |
||
247 | * |
||
248 | * @throws CircleNotFoundException |
||
249 | * @throws FederatedEventException |
||
250 | * @throws FederatedItemException |
||
251 | * @throws InitiatorNotConfirmedException |
||
252 | * @throws InitiatorNotFoundException |
||
253 | * @throws OwnerNotFoundException |
||
254 | * @throws RemoteInstanceException |
||
255 | * @throws RemoteNotFoundException |
||
256 | * @throws RemoteResourceNotFoundException |
||
257 | * @throws RequestBuilderException |
||
258 | * @throws UnknownRemoteException |
||
259 | */ |
||
260 | public function destroyCircle(string $singleId): void { |
||
263 | |||
264 | |||
265 | /** |
||
266 | * returns Circles available, based on current session |
||
267 | * |
||
268 | * @return Circle[] |
||
269 | * @throws InitiatorNotFoundException |
||
270 | * @throws RequestBuilderException |
||
271 | */ |
||
272 | public function getCircles(): array { |
||
275 | |||
276 | |||
277 | /** |
||
278 | * @param string $singleId |
||
279 | * |
||
280 | * @return Circle |
||
281 | * @throws CircleNotFoundException |
||
282 | * @throws InitiatorNotFoundException |
||
283 | * @throws RequestBuilderException |
||
284 | */ |
||
285 | public function getCircle(string $singleId): Circle { |
||
288 | |||
289 | |||
290 | |||
291 | /** |
||
292 | * WIP |
||
293 | * |
||
294 | * @return Circle[] |
||
295 | * @throws InitiatorNotFoundException |
||
296 | * @throws RequestBuilderException |
||
297 | */ |
||
298 | // public function getAllCircles(): array { |
||
299 | // $this->federatedUserService->bypassCurrentUserCondition(true); |
||
300 | // $this->circleService->getCircles(); |
||
301 | // } |
||
302 | |||
303 | |||
304 | /** |
||
305 | * WIP |
||
306 | * |
||
307 | * @param string $circleId |
||
308 | * @param string $singleId |
||
309 | * |
||
310 | * @return Member |
||
311 | * @throws InitiatorNotFoundException |
||
312 | * @throws MemberNotFoundException |
||
313 | * @throws RequestBuilderException |
||
314 | */ |
||
315 | // public function getMember(string $circleId, string $singleId): Member { |
||
316 | // $this->federatedUserService->bypassCurrentUserCondition(true); |
||
317 | // $this->memberService->getMemberById($circleId, $singleId); |
||
318 | // } |
||
319 | |||
320 | |||
321 | /** |
||
322 | * WIP |
||
323 | * |
||
324 | * @param string $memberId |
||
325 | * |
||
326 | * @return Member |
||
327 | */ |
||
328 | // public function getMemberById(string $memberId): Member { |
||
329 | |||
330 | |||
331 | } |
||
332 | |||
333 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.