Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
locker.php
1<?php
2
4
8
9class Locker
10{
19 public static function lock(string $key, int $id)
20 {
21 $lockName = self::getLockName($key, $id);
22
23 return Application::getInstance()->getConnection()->lock($lockName);
24 }
25
34 public static function unlock(string $key, int $id)
35 {
36 $lockName = self::getLockName($key, $id);
37
38 return Application::getInstance()->getConnection()->unlock($lockName);
39 }
40
49 private static function getLockName(string $key, int $id): string
50 {
51 return "{$key}_{$id}";
52 }
53}
static lock(string $key, int $id)
Definition locker.php:19
static unlock(string $key, int $id)
Definition locker.php:34