1 | <?php |
||
49 | class Options |
||
50 | { |
||
51 | |||
52 | /** |
||
53 | * |
||
54 | * @var ImplementationInterface |
||
55 | */ |
||
56 | protected $implementation; |
||
57 | |||
58 | /** |
||
59 | * |
||
60 | * @var string |
||
61 | */ |
||
62 | protected $address; |
||
63 | |||
64 | /** |
||
65 | * Connection object. |
||
66 | * |
||
67 | * @var ConnectionInterface |
||
68 | */ |
||
69 | protected $connection; |
||
70 | |||
71 | /** |
||
72 | * PSR-3 Logger interface. |
||
73 | * |
||
74 | * @var LoggerInterface |
||
75 | */ |
||
76 | protected $logger; |
||
77 | |||
78 | /** |
||
79 | * |
||
80 | * @var string |
||
81 | */ |
||
82 | protected $to; |
||
83 | |||
84 | /** |
||
85 | * |
||
86 | * @var string |
||
87 | */ |
||
88 | protected $username; |
||
89 | |||
90 | /** |
||
91 | * |
||
92 | * @var string |
||
93 | */ |
||
94 | protected $password; |
||
95 | |||
96 | /** |
||
97 | * |
||
98 | * @var string |
||
99 | */ |
||
100 | protected $jid; |
||
101 | |||
102 | /** |
||
103 | * |
||
104 | * @var string |
||
105 | */ |
||
106 | protected $sid; |
||
107 | |||
108 | /** |
||
109 | * |
||
110 | * @var boolean |
||
111 | */ |
||
112 | protected $authenticated = false; |
||
113 | |||
114 | /** |
||
115 | * |
||
116 | * @var array |
||
117 | */ |
||
118 | protected $users = []; |
||
119 | |||
120 | /** |
||
121 | * Timeout for connection. |
||
122 | * |
||
123 | * @var integer |
||
124 | */ |
||
125 | protected $timeout = 30; |
||
126 | |||
127 | /** |
||
128 | * Authentication methods. |
||
129 | * |
||
130 | * @var array |
||
131 | */ |
||
132 | protected $authenticationClasses = [ |
||
133 | 'digest-md5' => '\\Fabiang\\Xmpp\\EventListener\\Stream\\Authentication\\DigestMd5', |
||
134 | 'plain' => '\\Fabiang\\Xmpp\\EventListener\\Stream\\Authentication\\Plain', |
||
135 | 'anonymous' => '\\Fabiang\\Xmpp\\EventListener\\Stream\\Authentication\\Anonymous' |
||
136 | 3 | ]; |
|
137 | |||
138 | 3 | ||
139 | 3 | /** |
|
140 | 3 | * Options used to create a stream context |
|
141 | 3 | * |
|
142 | * @var array |
||
143 | */ |
||
144 | protected $contextOptions = []; |
||
145 | |||
146 | |||
147 | /** |
||
148 | 3 | * Constructor. |
|
149 | * |
||
150 | 3 | * @param string $address Server address |
|
151 | 3 | */ |
|
152 | 3 | public function __construct($address = null) |
|
158 | |||
159 | /** |
||
160 | * Get protocol implementation. |
||
161 | * |
||
162 | * @return ImplementationInterface |
||
163 | 3 | */ |
|
164 | public function getImplementation() |
||
172 | |||
173 | /** |
||
174 | 3 | * Set protocol implementation. |
|
175 | * |
||
176 | 3 | * @param ImplementationInterface $implementation |
|
177 | * @return $this |
||
178 | */ |
||
179 | public function setImplementation(ImplementationInterface $implementation) |
||
184 | |||
185 | /** |
||
186 | * Get server address. |
||
187 | 3 | * |
|
188 | * @return string |
||
189 | 3 | */ |
|
190 | 3 | public function getAddress() |
|
194 | |||
195 | /** |
||
196 | * Set server address. |
||
197 | * |
||
198 | * When a address is passed this setter also calls setTo with the hostname part of the address. |
||
199 | * |
||
200 | * @param string $address Server address |
||
201 | 3 | * @return $this |
|
202 | */ |
||
203 | 3 | public function setAddress($address) |
|
211 | |||
212 | 3 | /** |
|
213 | * Get connection object. |
||
214 | 3 | * |
|
215 | 3 | * @return ConnectionInterface |
|
216 | */ |
||
217 | public function getConnection() |
||
221 | |||
222 | /** |
||
223 | 3 | * Set connection object. |
|
224 | * |
||
225 | 3 | * @param ConnectionInterface $connection |
|
226 | * @return $this |
||
227 | */ |
||
228 | public function setConnection(ConnectionInterface $connection) |
||
233 | |||
234 | 3 | /** |
|
235 | * Get logger instance. |
||
236 | 3 | * |
|
237 | 3 | * @return LoggerInterface |
|
238 | */ |
||
239 | public function getLogger() |
||
243 | |||
244 | /** |
||
245 | 3 | * Set logger instance. |
|
246 | * |
||
247 | 3 | * @param \Psr\Log\LoggerInterface $logger PSR-3 Logger |
|
248 | * @return $this |
||
249 | */ |
||
250 | public function setLogger(LoggerInterface $logger) |
||
255 | |||
256 | /** |
||
257 | * Get server name. |
||
258 | 3 | * |
|
259 | * @return string |
||
260 | 3 | */ |
|
261 | 3 | public function getTo() |
|
265 | |||
266 | /** |
||
267 | * Set server name. |
||
268 | * |
||
269 | 3 | * This value is send to the server in requests as to="" attribute. |
|
270 | * |
||
271 | 3 | * @param string $to |
|
272 | * @return $this |
||
273 | */ |
||
274 | public function setTo($to) |
||
279 | |||
280 | 3 | /** |
|
281 | * Get username. |
||
282 | 3 | * |
|
283 | 3 | * @return string |
|
284 | */ |
||
285 | public function getUsername() |
||
289 | |||
290 | /** |
||
291 | * Set username. |
||
292 | * |
||
293 | * @param string $username |
||
294 | * @return $this |
||
295 | */ |
||
296 | public function setUsername($username) |
||
301 | |||
302 | /** |
||
303 | 3 | * Get resource. |
|
304 | * |
||
305 | 3 | * @return string |
|
306 | */ |
||
307 | public function getResource() |
||
313 | |||
314 | 3 | /** |
|
315 | * Get password. |
||
316 | 3 | * |
|
317 | 3 | * @return string |
|
318 | */ |
||
319 | public function getPassword() |
||
323 | |||
324 | /** |
||
325 | 3 | * Set password. |
|
326 | * |
||
327 | 3 | * @param string $password |
|
328 | * @return $this |
||
329 | */ |
||
330 | public function setPassword($password) |
||
335 | |||
336 | 3 | /** |
|
337 | * Get users jid. |
||
338 | 3 | * |
|
339 | 3 | * @return string |
|
340 | */ |
||
341 | public function getJid() |
||
345 | |||
346 | /** |
||
347 | 3 | * Set users jid. |
|
348 | * |
||
349 | 3 | * @param string $jid |
|
350 | * @return $this |
||
351 | */ |
||
352 | public function setJid($jid) |
||
357 | |||
358 | 3 | /** |
|
359 | * Get users jid. |
||
360 | 3 | * |
|
361 | 3 | * @return string |
|
362 | */ |
||
363 | public function getSid() |
||
367 | |||
368 | /** |
||
369 | 3 | * Set users jid. |
|
370 | * |
||
371 | 3 | * @param string $jid |
|
|
|||
372 | * @return $this |
||
373 | */ |
||
374 | public function setSid($sid) |
||
379 | |||
380 | 3 | /** |
|
381 | * Is user authenticated. |
||
382 | 3 | * |
|
383 | 3 | * @return boolean |
|
384 | */ |
||
385 | public function isAuthenticated() |
||
389 | |||
390 | /** |
||
391 | 3 | * Set authenticated. |
|
392 | * |
||
393 | 3 | * @param boolean $authenticated Flag |
|
394 | * @return $this |
||
395 | */ |
||
396 | public function setAuthenticated($authenticated) |
||
401 | 3 | ||
402 | /** |
||
403 | 3 | * Get users. |
|
404 | 3 | * |
|
405 | * @return Protocol\User\User[] |
||
406 | */ |
||
407 | public function getUsers() |
||
411 | |||
412 | 3 | /** |
|
413 | * Set users. |
||
414 | 3 | * |
|
415 | * @param array $users User list |
||
416 | * @return $this |
||
417 | */ |
||
418 | public function setUsers(array $users) |
||
423 | 3 | ||
424 | /** |
||
425 | 3 | * Get authentication classes. |
|
426 | 3 | * |
|
427 | * @return array |
||
428 | */ |
||
429 | public function getAuthenticationClasses() |
||
433 | |||
434 | /** |
||
435 | * |
||
436 | * @param array $authenticationClasses Authentication classes |
||
437 | * @return $this |
||
438 | */ |
||
439 | public function setAuthenticationClasses(array $authenticationClasses) |
||
444 | |||
445 | /** |
||
446 | * Get timeout for connection. |
||
447 | * |
||
448 | * @return integer |
||
449 | */ |
||
450 | public function getTimeout() |
||
454 | |||
455 | /** |
||
456 | * Set timeout for connection. |
||
457 | * |
||
458 | * @param integer $timeout Seconds |
||
459 | * @return \Fabiang\Xmpp\Options |
||
460 | */ |
||
461 | public function setTimeout($timeout) |
||
466 | |||
467 | /** |
||
468 | * Get context options for connection |
||
469 | * |
||
470 | * @return array |
||
471 | */ |
||
472 | public function getContextOptions() |
||
476 | |||
477 | /** |
||
478 | * Set context options for connection |
||
479 | * |
||
480 | * @param array $contextOptions |
||
481 | * @return \Fabiang\Xmpp\Options |
||
482 | */ |
||
483 | public function setContextOptions($contextOptions) |
||
488 | } |
||
489 |
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.