1 | <?php |
||
12 | class ClientManager |
||
13 | { |
||
14 | /** @var array **/ |
||
15 | protected $clients = []; |
||
16 | /** @var RedisManager **/ |
||
17 | protected $redisManager; |
||
18 | /** @var SessionWrapper **/ |
||
19 | protected $sessionWrapper; |
||
20 | /** @var int **/ |
||
21 | protected $sessionLifetime; |
||
22 | |||
23 | /** |
||
24 | * @param RedisManager $redisManager |
||
25 | * @param SessionWrapper $sessionWrapper |
||
26 | * @param int $sessionLifetime |
||
27 | */ |
||
28 | public function __construct(RedisManager $redisManager, SessionWrapper $sessionWrapper, $sessionLifetime) |
||
34 | |||
35 | /** |
||
36 | * @return array |
||
37 | */ |
||
38 | public function getClients() |
||
42 | |||
43 | /** |
||
44 | * @param Request $request |
||
45 | * @return Client |
||
46 | */ |
||
47 | public function getClient(Request $request) |
||
65 | |||
66 | /** |
||
67 | * @param Request $request |
||
68 | * @return Client |
||
69 | */ |
||
70 | public function createClient(Request $request) |
||
82 | |||
83 | /** |
||
84 | * @param string $sessionId |
||
85 | * @param int $playerId |
||
86 | */ |
||
87 | public function bindPlayerId($sessionId, $playerId) |
||
93 | |||
94 | /** |
||
95 | * @param int $playerId |
||
96 | * @return Session |
||
97 | */ |
||
98 | public function getSessionByPlayerId($playerId) |
||
105 | |||
106 | /** |
||
107 | * @return string |
||
108 | */ |
||
109 | protected function generateClientId() |
||
117 | |||
118 | /** |
||
119 | * @param int $clientId |
||
120 | * @return boolean |
||
121 | */ |
||
122 | public function removeClient($clientId) |
||
131 | |||
132 | public function clear() |
||
143 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.