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 | * SOCKS proxy address |
||
129 | * |
||
130 | * @var string |
||
131 | */ |
||
132 | protected $socksProxyAddress; |
||
133 | |||
134 | /** |
||
135 | * Authentication methods. |
||
136 | 3 | * |
|
137 | * @var array |
||
138 | 3 | */ |
|
139 | 3 | protected $authenticationClasses = [ |
|
140 | 3 | 'digest-md5' => '\\Fabiang\\Xmpp\\EventListener\\Stream\\Authentication\\DigestMd5', |
|
141 | 3 | 'plain' => '\\Fabiang\\Xmpp\\EventListener\\Stream\\Authentication\\Plain', |
|
142 | 'anonymous' => '\\Fabiang\\Xmpp\\EventListener\\Stream\\Authentication\\Anonymous' |
||
143 | ]; |
||
144 | |||
145 | |||
146 | /** |
||
147 | * Options used to create a stream context |
||
148 | 3 | * |
|
149 | * @var array |
||
150 | 3 | */ |
|
151 | 3 | protected $contextOptions = []; |
|
152 | 3 | ||
153 | |||
154 | 3 | /** |
|
155 | * Constructor. |
||
156 | * |
||
157 | * @param string $address Server address |
||
158 | */ |
||
159 | public function __construct($address = null) |
||
165 | 3 | ||
166 | 3 | /** |
|
167 | * Get protocol implementation. |
||
168 | * |
||
169 | * @return ImplementationInterface |
||
170 | */ |
||
171 | public function getImplementation() |
||
179 | |||
180 | /** |
||
181 | * Set protocol implementation. |
||
182 | * |
||
183 | * @param ImplementationInterface $implementation |
||
184 | * @return $this |
||
185 | */ |
||
186 | public function setImplementation(ImplementationInterface $implementation) |
||
191 | 3 | ||
192 | 3 | /** |
|
193 | 3 | * Get server address. |
|
194 | * |
||
195 | * @return string |
||
196 | */ |
||
197 | public function getAddress() |
||
201 | 3 | ||
202 | /** |
||
203 | 3 | * Set server address. |
|
204 | * |
||
205 | * When a address is passed this setter also calls setTo with the hostname part of the address. |
||
206 | * |
||
207 | * @param string $address Server address |
||
208 | * @return $this |
||
209 | */ |
||
210 | public function setAddress($address) |
||
218 | |||
219 | /** |
||
220 | * Get connection object. |
||
221 | * |
||
222 | * @return ConnectionInterface |
||
223 | 3 | */ |
|
224 | public function getConnection() |
||
228 | |||
229 | /** |
||
230 | * Set connection object. |
||
231 | * |
||
232 | * @param ConnectionInterface $connection |
||
233 | * @return $this |
||
234 | 3 | */ |
|
235 | public function setConnection(ConnectionInterface $connection) |
||
240 | |||
241 | /** |
||
242 | * Get logger instance. |
||
243 | * |
||
244 | * @return LoggerInterface |
||
245 | 3 | */ |
|
246 | public function getLogger() |
||
250 | |||
251 | /** |
||
252 | * Set logger instance. |
||
253 | * |
||
254 | * @param \Psr\Log\LoggerInterface $logger PSR-3 Logger |
||
255 | * @return $this |
||
256 | */ |
||
257 | public function setLogger(LoggerInterface $logger) |
||
262 | |||
263 | /** |
||
264 | * Get server name. |
||
265 | * |
||
266 | * @return string |
||
267 | */ |
||
268 | public function getTo() |
||
272 | |||
273 | /** |
||
274 | * Set server name. |
||
275 | * |
||
276 | * This value is send to the server in requests as to="" attribute. |
||
277 | * |
||
278 | * @param string $to |
||
279 | * @return $this |
||
280 | 3 | */ |
|
281 | public function setTo($to) |
||
286 | |||
287 | /** |
||
288 | * Get username. |
||
289 | * |
||
290 | * @return string |
||
291 | */ |
||
292 | public function getUsername() |
||
296 | |||
297 | /** |
||
298 | * Set username. |
||
299 | * |
||
300 | * @param string $username |
||
301 | * @return $this |
||
302 | */ |
||
303 | 3 | public function setUsername($username) |
|
308 | |||
309 | /** |
||
310 | * Get resource. |
||
311 | * |
||
312 | * @return string |
||
313 | */ |
||
314 | 3 | public function getResource() |
|
320 | |||
321 | /** |
||
322 | * Get password. |
||
323 | * |
||
324 | * @return string |
||
325 | 3 | */ |
|
326 | public function getPassword() |
||
330 | |||
331 | /** |
||
332 | * Set password. |
||
333 | * |
||
334 | * @param string $password |
||
335 | * @return $this |
||
336 | 3 | */ |
|
337 | public function setPassword($password) |
||
342 | |||
343 | /** |
||
344 | * Get users jid. |
||
345 | * |
||
346 | * @return string |
||
347 | 3 | */ |
|
348 | public function getJid() |
||
352 | |||
353 | /** |
||
354 | * Set users jid. |
||
355 | * |
||
356 | * @param string $jid |
||
357 | * @return $this |
||
358 | 3 | */ |
|
359 | public function setJid($jid) |
||
364 | |||
365 | /** |
||
366 | * Get users jid. |
||
367 | * |
||
368 | * @return string |
||
369 | 3 | */ |
|
370 | public function getSid() |
||
374 | |||
375 | /** |
||
376 | * Set users jid. |
||
377 | * |
||
378 | * @param string $jid |
||
|
|||
379 | * @return $this |
||
380 | 3 | */ |
|
381 | public function setSid($sid) |
||
386 | |||
387 | /** |
||
388 | * Is user authenticated. |
||
389 | * |
||
390 | * @return boolean |
||
391 | 3 | */ |
|
392 | public function isAuthenticated() |
||
396 | |||
397 | /** |
||
398 | * Set authenticated. |
||
399 | * |
||
400 | * @param boolean $authenticated Flag |
||
401 | 3 | * @return $this |
|
402 | */ |
||
403 | 3 | public function setAuthenticated($authenticated) |
|
408 | |||
409 | /** |
||
410 | * Get users. |
||
411 | * |
||
412 | 3 | * @return Protocol\User\User[] |
|
413 | */ |
||
414 | 3 | public function getUsers() |
|
418 | |||
419 | /** |
||
420 | * Set users. |
||
421 | * |
||
422 | * @param array $users User list |
||
423 | 3 | * @return $this |
|
424 | */ |
||
425 | 3 | public function setUsers(array $users) |
|
430 | |||
431 | /** |
||
432 | * Get authentication classes. |
||
433 | * |
||
434 | * @return array |
||
435 | */ |
||
436 | public function getAuthenticationClasses() |
||
440 | |||
441 | /** |
||
442 | * |
||
443 | * @param array $authenticationClasses Authentication classes |
||
444 | * @return $this |
||
445 | */ |
||
446 | public function setAuthenticationClasses(array $authenticationClasses) |
||
451 | |||
452 | /** |
||
453 | * Get timeout for connection. |
||
454 | * |
||
455 | * @return integer |
||
456 | */ |
||
457 | public function getTimeout() |
||
461 | |||
462 | /** |
||
463 | * Set timeout for connection. |
||
464 | * |
||
465 | * @param integer $timeout Seconds |
||
466 | * @return \Fabiang\Xmpp\Options |
||
467 | */ |
||
468 | public function setTimeout($timeout) |
||
473 | |||
474 | /** |
||
475 | * Get context options for connection |
||
476 | * |
||
477 | * @return array |
||
478 | */ |
||
479 | public function getContextOptions() |
||
483 | |||
484 | /** |
||
485 | * Set context options for connection |
||
486 | * |
||
487 | * @param array $contextOptions |
||
488 | * @return \Fabiang\Xmpp\Options |
||
489 | */ |
||
490 | public function setContextOptions($contextOptions) |
||
495 | |||
496 | /** |
||
497 | * Get SOCKS proxy address |
||
498 | * |
||
499 | * @return string |
||
500 | */ |
||
501 | public function getSocksProxyAddress() |
||
505 | |||
506 | /** |
||
507 | * Set SOCKS proxy address |
||
508 | * |
||
509 | * @param string $socksProxyAddress |
||
510 | * @return \Fabiang\Xmpp\Options |
||
511 | */ |
||
512 | public function setSocksProxyAddress($socksProxyAddress) |
||
517 | } |
||
518 |
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.