1 | <?php |
||
20 | class Client |
||
21 | { |
||
22 | |||
23 | use WebSocketMessagesManager; |
||
24 | /** |
||
25 | * this id is the laravel auth id |
||
26 | * @var null|int $id |
||
27 | */ |
||
28 | public $id = null; |
||
29 | |||
30 | /** @var ConnectionInterface $conn */ |
||
31 | public $conn = null; |
||
32 | |||
33 | /** |
||
34 | * @var array |
||
35 | */ |
||
36 | public $rooms = []; |
||
37 | |||
38 | public $onCloseRoutes = []; |
||
39 | |||
40 | public $session = null; |
||
41 | |||
42 | /** |
||
43 | * @param string $route |
||
44 | * @return Client |
||
45 | */ |
||
46 | function onClose(string $route) |
||
52 | |||
53 | function removeOnCloseRoute(string $route) |
||
59 | } |
||
60 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.