1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
CacheTrait.php
См. документацию.
1<?php
2
3namespace Bitrix\Socialnetwork\Space\Toolbar\Switcher;
4
6{
7 private static ?SwitcherCollection $switchers = null;
8
9 public static function get(int $userId, ?int $spaceId, string $code): SwitcherInterface
10 {
11 static::init();
12
14 $switcher = new static($userId, $spaceId, $code);
15 if (static::$switchers->has($switcher))
16 {
17 return $switcher;
18 }
19
20 static::$switchers->add($switcher);
21 return $switcher;
22 }
23
24 private static function init(): void
25 {
26 if (is_null(static::$switchers))
27 {
28 static::$switchers = new SwitcherCollection();
29 }
30 }
31
32 public function invalidate(): void
33 {
34 $this->isInitialized = false;
35 }
36}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195