99class RedisSessionHandler implements \SessionHandlerInterface
1010{
1111 /**
12- * Инстанс редиса
12+ * instance Redis
1313 * @var \Redis
1414 */
1515 protected $ redis ;
1616
1717 /**
18- * Время жизни сессии
18+ * The lifetime of the session
1919 * @var int
2020 */
2121 protected $ ttl ;
2222
2323 /**
24- * Префикс
24+ * Prefix
2525 * @var string
2626 */
2727 protected $ prefix ;
2828
2929 /**
30- * Флаг блокировки
30+ * lock flag
3131 * @var bool
3232 */
3333 protected $ locked ;
3434
3535 /**
36- * Ключ блокировки
36+ * key lock
3737 * @var string
3838 */
3939 private $ lockKey ;
4040
4141 /**
42- * Токен блокировки
42+ * token locking
4343 * @var string
4444 */
4545 private $ token ;
4646
4747 /**
48- * Время между попытками разблокировки
48+ * The time between attempts to unlock
4949 * @var int
5050 */
5151 private $ spinLockWait ;
5252
5353 /**
54- * Максимальное время ожидания разблокировки
54+ * Maximum waiting time unlock
5555 * @var int
5656 */
5757 private $ lockMaxWait ;
@@ -99,7 +99,7 @@ protected function lockSession($sessionId)
9999 $ this ->getRedisKey ($ this ->lockKey ),
100100 $ this ->token ,
101101 [
102- 'NX ' , //Установить ключ только, если он уже не существует.
102+ 'NX ' ,
103103 ]
104104 );
105105 if ($ success ) {
@@ -112,7 +112,7 @@ protected function lockSession($sessionId)
112112 }
113113
114114 /**
115- * Снятие блокировки сессии
115+ * Unlock Session
116116 */
117117 private function unlockSession ()
118118 {
@@ -190,7 +190,7 @@ public function gc($lifetime)
190190 }
191191
192192 /**
193- * Установка времени жизни сессии
193+ * Setting Time session life
194194 * @param int $ttl
195195 */
196196 public function setTtl ($ ttl )
@@ -199,7 +199,7 @@ public function setTtl($ttl)
199199 }
200200
201201 /**
202- * Максимальное время ожидания разблокировки
202+ * Maximum waiting time unlock
203203 * @return int
204204 */
205205 public function getLockMaxWait ()
@@ -208,7 +208,7 @@ public function getLockMaxWait()
208208 }
209209
210210 /**
211- * Максимальное время ожидания разблокировки
211+ * Setting maximum waiting time unlock
212212 * @param int $lockMaxWait
213213 */
214214 public function setLockMaxWait ($ lockMaxWait )
@@ -217,7 +217,7 @@ public function setLockMaxWait($lockMaxWait)
217217 }
218218
219219 /**
220- * Подготовка ключа
220+ * Preparation key
221221 * @param string $key key
222222 * @return string prefixed key
223223 */
0 commit comments