1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
counter.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Socialnetwork\Internals
;
4
5
use
Bitrix\Main
;
6
use
Bitrix\Socialnetwork\Internals\Counter\CounterController
;
7
13
class
Counter
14
{
15
private
static
$instance = [];
16
17
private
$userId;
18
23
public
static
function
isReady
($userId): bool
24
{
25
return
array_key_exists($userId, self::$instance);
26
}
27
36
public
static
function
getInstance
($userId): self
37
{
38
if
(!array_key_exists($userId, self::$instance))
39
{
40
self::$instance[$userId] =
new
self
($userId);
41
}
42
43
return
self::$instance[$userId];
44
}
45
56
private
function
__construct(
$userId
)
57
{
58
$this->userId = (int)
$userId
;
59
}
60
68
public
function
get
(
$name
,
int
$entityId
= 0)
69
{
70
return
CounterController::getValue
(
$name
,
$entityId
, $this->userId);
71
}
72
}
$userId
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения
check_mail.php:18
Bitrix\Socialnetwork\Internals\Counter\CounterController
Определения
countercontroller.php:14
Bitrix\Socialnetwork\Internals\Counter\CounterController\getValue
static getValue(string $name='', int $entityId=0, int $userId=0)
Определения
countercontroller.php:15
Bitrix\Socialnetwork\Internals\Counter\getInstance
static getInstance($userId)
Определения
counter.php:36
Bitrix\Socialnetwork\Internals\Counter\isReady
static isReady($userId)
Определения
counter.php:23
$name
$name
Определения
menu_edit.php:35
Bitrix\Main
Bitrix\Socialnetwork\Internals\Counter
Определения
countercontroller.php:9
Bitrix\Socialnetwork\Internals
Определения
counter.php:3
$entityId
$entityId
Определения
payment.php:4
bitrix
modules
socialnetwork
lib
internals
counter.php
Создано системой
1.14.0