1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
counter.php
См. документацию.
1<?php
2
4
7
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}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
static getValue(string $name='', int $entityId=0, int $userId=0)
Определения countercontroller.php:15
static getInstance($userId)
Определения counter.php:36
static isReady($userId)
Определения counter.php:23
$name
Определения menu_edit.php:35
$entityId
Определения payment.php:4